Index: tools/lua/lua_pictures.cpp |
diff --git a/tools/lua/lua_pictures.cpp b/tools/lua/lua_pictures.cpp |
index 58983f4d58f56d9f7f2d6f861bc21918c10d1095..eee7088f0d14dc97b012cf0b736e1a37483ab775 100644 |
--- a/tools/lua/lua_pictures.cpp |
+++ b/tools/lua/lua_pictures.cpp |
@@ -39,8 +39,8 @@ |
DEFINE_bool2(quiet, q, false, "Silence all non-error related output"); |
static sk_sp<SkPicture> load_picture(const char path[]) { |
- std::unique_ptr<SkStream> stream = SkStream::MakeFromFile(path); |
- if (stream) { |
+ SkAutoTDelete<SkStream> stream(SkStream::NewFromFile(path)); |
+ if (stream.get()) { |
return SkPicture::MakeFromStream(stream.get()); |
} |
return nullptr; |