Index: tools/debugger/SkDrawCommand.cpp |
diff --git a/tools/debugger/SkDrawCommand.cpp b/tools/debugger/SkDrawCommand.cpp |
index fcd2885828328f040f28f0827adc60e89f99499e..a32e0b6211218551d67ff7594b313e87240ae1bd 100644 |
--- a/tools/debugger/SkDrawCommand.cpp |
+++ b/tools/debugger/SkDrawCommand.cpp |
@@ -1169,10 +1169,9 @@ static void extract_json_paint_xfermode(Json::Value& jsonPaint, UrlDataManager& |
SkPaint* target) { |
if (jsonPaint.isMember(SKDEBUGCANVAS_ATTRIBUTE_XFERMODE)) { |
Json::Value jsonXfermode = jsonPaint[SKDEBUGCANVAS_ATTRIBUTE_XFERMODE]; |
- SkXfermode* xfermode = (SkXfermode*) load_flattenable(jsonXfermode, urlDataManager); |
+ sk_sp<SkXfermode> xfermode((SkXfermode*) load_flattenable(jsonXfermode, urlDataManager)); |
if (xfermode != nullptr) { |
target->setXfermode(xfermode); |
- xfermode->unref(); |
} |
} |
} |