Fix T67117: Font thumbnails crash to desktop
We were missing a null pointer check for invalid fonts.
This commit is contained in:
@@ -96,7 +96,7 @@ KerningCacheBLF *blf_kerning_cache_new(FontBLF *font)
|
||||
.x = 0,
|
||||
.y = 0,
|
||||
};
|
||||
if (g_prev && FT_Get_Kerning(font->face, g_prev->idx, g->idx, kc->mode, &delta) == 0) {
|
||||
if (g && g_prev && FT_Get_Kerning(font->face, g_prev->idx, g->idx, kc->mode, &delta) == 0) {
|
||||
kc->table[i][j] = (int)delta.x >> 6;
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user