Index: src/ports/SkFontMgr_android.cpp |
diff --git a/src/ports/SkFontMgr_android.cpp b/src/ports/SkFontMgr_android.cpp |
index 23c950d01d2f53dc297b2a6ba8c16d6932dce717..94d114d07a48bd2e78f3c251afac0d4e0aa9272b 100644 |
--- a/src/ports/SkFontMgr_android.cpp |
+++ b/src/ports/SkFontMgr_android.cpp |
@@ -75,8 +75,8 @@ public: |
SkStreamAsset* createStream() const { |
if (fFile) { |
- SkData* data = SkData::NewFromFILE(fFile); |
- return data ? new SkMemoryStream(data) : nullptr; |
+ sk_sp<SkData> data(SkData::MakeFromFILE(fFile)); |
+ return data ? new SkMemoryStream(std::move(data)) : nullptr; |
} |
return SkStream::NewFromFile(fPathName.c_str()); |
} |