Dont ignore errors from FT_Get_Glyph

This commit is contained in:
Paul Tarjan 2014-01-13 16:30:48 -08:00 committed by Mark Plomer
parent a00c2b1bf5
commit 9f25f736ed

View File

@ -1089,7 +1089,15 @@ gdImageStringFTEx (gdImage * im, int *brect, int fg, char *fontlist, double ptsi
}
/* transform glyph image */
FT_Get_Glyph(slot, &image);
if (FT_Get_Glyph(slot, &image)) {
if (tmpstr) {
gdFree(tmpstr);
}
gdCacheDelete(tc_cache);
gdMutexUnlock(gdFontCacheMutex);
return "Problem loading glyph";
}
if (brect) { /* only if need brect */
FT_Glyph_Get_CBox(image, ft_glyph_bbox_gridfit, &glyph_bbox);
glyph_bbox.xMin += penf.x;