Index: tools/lua/lua_pictures.cpp |
diff --git a/tools/lua/lua_pictures.cpp b/tools/lua/lua_pictures.cpp |
index 9776002e7a6128823994e44dd7111f31360a0c77..eee7088f0d14dc97b012cf0b736e1a37483ab775 100644 |
--- a/tools/lua/lua_pictures.cpp |
+++ b/tools/lua/lua_pictures.cpp |
@@ -85,9 +85,9 @@ int tool_main(int argc, char** argv) { |
SkLua L(summary); |
for (int i = 0; i < FLAGS_luaFile.count(); ++i) { |
- SkAutoDataUnref data(SkData::NewFromFileName(FLAGS_luaFile[i])); |
- if (nullptr == data.get()) { |
- data.reset(SkData::NewEmpty()); |
+ sk_sp<SkData> data(SkData::MakeFromFileName(FLAGS_luaFile[i])); |
+ if (!data) { |
+ data = SkData::MakeEmpty(); |
} |
if (!FLAGS_quiet) { |
SkDebugf("loading %s...\n", FLAGS_luaFile[i]); |