mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
Fix T67117: Font thumbnails crash to desktop
We were missing a null pointer check for invalid fonts.
This commit is contained in:
parent
3c9a7d0652
commit
db15b23745
1 changed files with 1 additions and 1 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue