Index: gm/offsetimagefilter.cpp |
diff --git a/gm/offsetimagefilter.cpp b/gm/offsetimagefilter.cpp |
index 6645a98b611fd0d6db48bc2397cfc5b8c30065a0..4c8242a4b22741cdd09fa64e46f2cd1292e1f20f 100644 |
--- a/gm/offsetimagefilter.cpp |
+++ b/gm/offsetimagefilter.cpp |
@@ -143,7 +143,9 @@ protected: |
canvas->save(); |
canvas->clipRect(*clipR); |
} |
- p.setImageFilter(imgf); |
+ if (imgf) { |
+ p.setImageFilter(imgf)->unref(); |
+ } |
p.setColor(0x66FF0000); |
canvas->drawRect(r, p); |