mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-04 08:55:35 +00:00
app/internal/gpu: make the zero value of paint.ImageOp useful
Do not panic when drawing the zero value of paint.ImageOp. Signed-off-by: Greg Pomerantz <gmp.gio@wow.st>
This commit is contained in:
committed by
Elias Naur
parent
8d1e53cfa9
commit
72cb36c5f9
@@ -139,7 +139,7 @@ func decodeImageOp(data []byte, refs []interface{}) imageOpData {
|
|||||||
}
|
}
|
||||||
handle := refs[1]
|
handle := refs[1]
|
||||||
if handle == nil {
|
if handle == nil {
|
||||||
panic("nil handle")
|
return imageOpData{}
|
||||||
}
|
}
|
||||||
return imageOpData{
|
return imageOpData{
|
||||||
src: refs[0].(*image.RGBA),
|
src: refs[0].(*image.RGBA),
|
||||||
|
|||||||
Reference in New Issue
Block a user