Index: tools/debugger/SkDrawCommand.cpp |
diff --git a/tools/debugger/SkDrawCommand.cpp b/tools/debugger/SkDrawCommand.cpp |
index a32e0b6211218551d67ff7594b313e87240ae1bd..d868418d54ba8b4506fbaa05bb38a2f88f6979ec 100644 |
--- a/tools/debugger/SkDrawCommand.cpp |
+++ b/tools/debugger/SkDrawCommand.cpp |
@@ -726,12 +726,12 @@ static SkFlattenable* load_flattenable(Json::Value jsonFlattenable, |
const void* data; |
int size = decode_data(jsonFlattenable[SKDEBUGCANVAS_ATTRIBUTE_DATA], urlDataManager, &data); |
SkValidatingReadBuffer buffer(data, size); |
- SkFlattenable* result = factory(buffer); |
+ sk_sp<SkFlattenable> result = factory(buffer); |
if (!buffer.isValid()) { |
SkDebugf("invalid buffer loading flattenable\n"); |
return nullptr; |
} |
- return result; |
+ return result.release(); |
} |
static SkColorType colortype_from_name(const char* name) { |