Index: tools/debugger/SkDrawCommand.cpp |
diff --git a/tools/debugger/SkDrawCommand.cpp b/tools/debugger/SkDrawCommand.cpp |
index 5bacf02b1a2e0bfaf6f59923d14db80eee9cdbe8..5dc6079897c21bc6807c7181404650f1af72fb7b 100644 |
--- a/tools/debugger/SkDrawCommand.cpp |
+++ b/tools/debugger/SkDrawCommand.cpp |
@@ -1159,11 +1159,10 @@ static void extract_json_paint_colorfilter(Json::Value& jsonPaint, UrlDataManage |
SkPaint* target) { |
if (jsonPaint.isMember(SKDEBUGCANVAS_ATTRIBUTE_COLORFILTER)) { |
Json::Value jsonColorFilter = jsonPaint[SKDEBUGCANVAS_ATTRIBUTE_COLORFILTER]; |
- SkColorFilter* colorFilter = (SkColorFilter*) load_flattenable(jsonColorFilter, |
- urlDataManager); |
+ sk_sp<SkColorFilter> colorFilter((SkColorFilter*)load_flattenable(jsonColorFilter, |
+ urlDataManager)); |
if (colorFilter != nullptr) { |
target->setColorFilter(colorFilter); |
- colorFilter->unref(); |
} |
} |
} |