~eliasnaur/gio-patches

app/internal/gpu: make the zero value of paint.ImageOp useful v1 PROPOSED

Greg Pomerantz
Greg Pomerantz: 1
 app/internal/gpu: make the zero value of paint.ImageOp useful

 1 files changed, 1 insertions(+), 1 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~eliasnaur/gio-patches/patches/9669/mbox | git am -3
Learn more about email & git

[PATCH] app/internal/gpu: make the zero value of paint.ImageOp useful Export this patch

Greg Pomerantz
Do not panic when drawing the zero value of paint.ImageOp.

Signed-off-by: Greg Pomerantz <gmp.gio@wow.st>
---
 app/internal/gpu/gpu.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/internal/gpu/gpu.go b/app/internal/gpu/gpu.go
index 3e208a6..54c4c12 100644
--- a/app/internal/gpu/gpu.go
+++ b/app/internal/gpu/gpu.go
@@ -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),
-- 
2.16.2
Thanks!
View this thread in the archives