Index: samplecode/SampleLua.cpp |
diff --git a/samplecode/SampleLua.cpp b/samplecode/SampleLua.cpp |
index 96b15b91b8778f00d26f98fd879cf334cac9879c..4d492f488c493849a72bc609510201a6a1e49124 100644 |
--- a/samplecode/SampleLua.cpp |
+++ b/samplecode/SampleLua.cpp |
@@ -60,10 +60,9 @@ public: |
fLua = new SkLua; |
SkString str = GetResourcePath(LUA_FILENAME); |
- SkData* data = SkData::NewFromFileName(str.c_str()); |
+ sk_sp<SkData> data(SkData::MakeFromFileName(str.c_str())); |
if (data) { |
fLua->runCode(data->data(), data->size()); |
- data->unref(); |
this->setImageFilename(fLua->get()); |
} else { |
fLua->runCode(gMissingCode); |