Index: src/ports/SkFontMgr_custom.cpp |
diff --git a/src/ports/SkFontMgr_custom.cpp b/src/ports/SkFontMgr_custom.cpp |
index 65887662b03435437555178ea09bd2b61383897f..97489de50d6fba69b71303722349a2d304379941 100644 |
--- a/src/ports/SkFontMgr_custom.cpp |
+++ b/src/ports/SkFontMgr_custom.cpp |
@@ -261,7 +261,7 @@ protected: |
} |
SkTypeface* onCreateFromData(SkData* data, int ttcIndex) const override { |
- return this->createFromStream(new SkMemoryStream(data), ttcIndex); |
+ return this->createFromStream(new SkMemoryStream(sk_ref_sp(data)), ttcIndex); |
} |
SkTypeface* onCreateFromStream(SkStreamAsset* bareStream, int ttcIndex) const override { |