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:
Greg Pomerantz
2020-01-29 09:13:02 -05:00
committed by Elias Naur
parent 8d1e53cfa9
commit 72cb36c5f9
+1 -1
View File
@@ -139,7 +139,7 @@ func decodeImageOp(data []byte, refs []interface{}) imageOpData {
}
handle := refs[1]
if handle == nil {
panic("nil handle")
return imageOpData{}
}
return imageOpData{
src: refs[0].(*image.RGBA),