Index: tools/debugger/SkDrawCommand.cpp |
diff --git a/tools/debugger/SkDrawCommand.cpp b/tools/debugger/SkDrawCommand.cpp |
index ab9c9de53c5114b3cc5159216c025543bc2f5350..45c9ffe0cad6e390e62e0681e309c85bc56a5c60 100644 |
--- a/tools/debugger/SkDrawCommand.cpp |
+++ b/tools/debugger/SkDrawCommand.cpp |
@@ -1155,10 +1155,9 @@ static void extract_json_paint_looper(Json::Value& jsonPaint, UrlDataManager& ur |
SkPaint* target) { |
if (jsonPaint.isMember(SKDEBUGCANVAS_ATTRIBUTE_LOOPER)) { |
Json::Value jsonLooper = jsonPaint[SKDEBUGCANVAS_ATTRIBUTE_LOOPER]; |
- SkDrawLooper* looper = (SkDrawLooper*) load_flattenable(jsonLooper, urlDataManager); |
+ sk_sp<SkDrawLooper> looper((SkDrawLooper*) load_flattenable(jsonLooper, urlDataManager)); |
if (looper != nullptr) { |
- target->setLooper(looper); |
- looper->unref(); |
+ target->setLooper(std::move(looper)); |
} |
} |
} |