Index: src/utils/SkLua.cpp |
diff --git a/src/utils/SkLua.cpp b/src/utils/SkLua.cpp |
index c25bbf4409ffe412cadc4a1f20a0f9679bac975e..01bf507f170052504bb40206434bb64339c43e33 100644 |
--- a/src/utils/SkLua.cpp |
+++ b/src/utils/SkLua.cpp |
@@ -1146,7 +1146,7 @@ static int lpaint_getShader(lua_State* L) { |
static int lpaint_setShader(lua_State* L) { |
SkPaint* paint = get_obj<SkPaint>(L, 1); |
- paint->setShader(get_ref<SkShader>(L, 2)); |
+ paint->setShader(sk_ref_sp(get_ref<SkShader>(L, 2))); |
return 0; |
} |