Fix crbug.com/117322 crash
Patch from Arthur Hsu, Original CL: http://codereview.appspot.com/5786057/
Review URL: https://codereview.appspot.com/5792050
git-svn-id: http://skia.googlecode.com/svn/trunk@3345
2bbb7eff-a529-9590-31e7-
b0007b416f81
populate_glyph_to_unicode(hdc, glyphCount, &(info->fGlyphToUnicode));
}
- if (otm.otmTextMetrics.tmPitchAndFamily & TMPF_TRUETYPE) {
+ if (glyphCount > 0 &&
+ (otm.otmTextMetrics.tmPitchAndFamily & TMPF_TRUETYPE)) {
info->fType = SkAdvancedTypefaceMetrics::kTrueType_Font;
} else {
info->fType = SkAdvancedTypefaceMetrics::kOther_Font;