Index: src/c/sk_paint.cpp |
diff --git a/src/c/sk_paint.cpp b/src/c/sk_paint.cpp |
index dd0733f02ed200707cd72fa0b32f64fe07e0beb6..b48e28fb6dcbddae6eb5f09b7db41aa94ec3d54d 100644 |
--- a/src/c/sk_paint.cpp |
+++ b/src/c/sk_paint.cpp |
@@ -6,6 +6,7 @@ |
*/ |
#include "SkPaint.h" |
+#include "SkShader.h" |
#include "sk_paint.h" |
#include "sk_types_priv.h" |
@@ -63,7 +64,7 @@ void sk_paint_set_color(sk_paint_t* cpaint, sk_color_t c) { |
} |
void sk_paint_set_shader(sk_paint_t* cpaint, sk_shader_t* cshader) { |
- AsPaint(cpaint)->setShader(AsShader(cshader)); |
+ AsPaint(cpaint)->setShader(sk_ref_sp(AsShader(cshader))); |
} |
void sk_paint_set_maskfilter(sk_paint_t* cpaint, sk_maskfilter_t* cfilter) { |