Index: src/fonts/SkFontMgr_indirect.cpp |
diff --git a/src/fonts/SkFontMgr_indirect.cpp b/src/fonts/SkFontMgr_indirect.cpp |
index c438623c613b260d66f4109930e2418b4c218b23..6f94dfd367a1dadcadd32a155601c79071c261e2 100644 |
--- a/src/fonts/SkFontMgr_indirect.cpp |
+++ b/src/fonts/SkFontMgr_indirect.cpp |
@@ -213,19 +213,19 @@ SkTypeface* SkFontMgr_Indirect::createTypefaceFromFontId(const SkFontIdentity& i |
// No exact match, but did find a data match. |
if (dataTypeface.get() != NULL) { |
- SkAutoTUnref<SkStream> stream(dataTypeface->openStream(NULL)); |
+ SkAutoTDelete<SkStream> stream(dataTypeface->openStream(NULL)); |
if (stream.get() != NULL) { |
- return fImpl->createFromStream(stream.get(), dataTypefaceIndex); |
+ return fImpl->createFromStream(stream.detach(), dataTypefaceIndex); |
} |
} |
// No data match, request data and add entry. |
- SkAutoTUnref<SkStreamAsset> stream(fProxy->getData(id.fDataId)); |
+ SkAutoTDelete<SkStreamAsset> stream(fProxy->getData(id.fDataId)); |
if (stream.get() == NULL) { |
return NULL; |
} |
- SkAutoTUnref<SkTypeface> typeface(fImpl->createFromStream(stream, id.fTtcIndex)); |
+ SkAutoTUnref<SkTypeface> typeface(fImpl->createFromStream(stream.detach(), id.fTtcIndex)); |
if (typeface.get() == NULL) { |
return NULL; |
} |