Skip to content

Commit d599d36

Browse files
author
Paul Tarjan
committed
Dont ignore errors from FT_Get_Glyph
1 parent bbc37e7 commit d599d36

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

ext/gd/libgd/gdft.c

+9-1
Original file line numberDiff line numberDiff line change
@@ -1050,7 +1050,15 @@ gdImageStringFTEx (gdImage * im, int *brect, int fg, char *fontlist, double ptsi
10501050
}
10511051

10521052
/* transform glyph image */
1053-
FT_Get_Glyph(slot, &image);
1053+
if (FT_Get_Glyph(slot, &image)) {
1054+
if (tmpstr) {
1055+
gdFree(tmpstr);
1056+
}
1057+
gdCacheDelete(tc_cache);
1058+
gdMutexUnlock(gdFontCacheMutex);
1059+
return "Problem loading glyph";
1060+
}
1061+
10541062
if (brect) { /* only if need brect */
10551063
FT_Glyph_Get_CBox(image, ft_glyph_bbox_gridfit, &glyph_bbox);
10561064
glyph_bbox.xMin += penf.x;

0 commit comments

Comments
 (0)