| Index: src/ports/SkFontMgr_custom.cpp
|
| diff --git a/src/ports/SkFontMgr_custom.cpp b/src/ports/SkFontMgr_custom.cpp
|
| index 7f3ce6b03208ef6759dae895522aab7f726bd2ba..158ba006d4f16ad3b0b1b9a94a006ee68fb2a59f 100644
|
| --- a/src/ports/SkFontMgr_custom.cpp
|
| +++ b/src/ports/SkFontMgr_custom.cpp
|
| @@ -296,7 +296,7 @@ protected:
|
| SkFontStyle style;
|
| SkString name;
|
| if (fScanner.scanFont(stream, ttcIndex, &name, &style, &isFixedPitch, nullptr)) {
|
| - return new SkTypeface_Stream(style, isFixedPitch, false, name, stream.detach(),
|
| + return new SkTypeface_Stream(style, isFixedPitch, false, name, stream.release(),
|
| ttcIndex);
|
| } else {
|
| return nullptr;
|
| @@ -305,7 +305,7 @@ protected:
|
|
|
| SkTypeface* onCreateFromFile(const char path[], int ttcIndex) const override {
|
| SkAutoTDelete<SkStreamAsset> stream(SkStream::NewFromFile(path));
|
| - return stream.get() ? this->createFromStream(stream.detach(), ttcIndex) : nullptr;
|
| + return stream.get() ? this->createFromStream(stream.release(), ttcIndex) : nullptr;
|
| }
|
|
|
| SkTypeface* onLegacyCreateTypeface(const char familyName[], unsigned styleBits) const override {
|
| @@ -489,7 +489,7 @@ private:
|
|
|
| SkTypeface_Custom* tf =
|
| new SkTypeface_Stream(style, isFixedPitch, true, // system-font (cannot delete)
|
| - realname, stream.detach(), faceIndex);
|
| + realname, stream.release(), faceIndex);
|
|
|
| SkFontStyleSet_Custom* addTo = find_family(*families, realname.c_str());
|
| if (nullptr == addTo) {
|
|
|