Index: src/ports/SkFontMgr_android.cpp |
diff --git a/src/ports/SkFontMgr_android.cpp b/src/ports/SkFontMgr_android.cpp |
index 3e6e0da18ae3913febe5f6819f30e9ab940ee779..4aea047cdeee106cbffc401d4217fb638d8d0ad4 100644 |
--- a/src/ports/SkFontMgr_android.cpp |
+++ b/src/ports/SkFontMgr_android.cpp |
@@ -371,7 +371,7 @@ |
{ |
for (int i = 0; i < fallbackNameToFamilyMap.count(); ++i) { |
SkFontStyleSet_Android* family = fallbackNameToFamilyMap[i].styleSet; |
- sk_sp<SkTypeface_AndroidSystem> face(family->matchStyle(style)); |
+ SkAutoTUnref<SkTypeface_AndroidSystem> face(family->matchStyle(style)); |
if (!langTag.isEmpty() && !face->fLang.getTag().startsWith(langTag.c_str())) { |
continue; |
@@ -387,6 +387,9 @@ |
uint16_t glyphID; |
paint.textToGlyphs(&character, sizeof(character), &glyphID); |
tomhudson
2016/05/12 13:29:39
Looks like we accidentally omitted the return stat
|
+ if (glyphID != 0) { |
+ return face.release(); |
+ } |
} |
return nullptr; |
} |