Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Parborg <darkdefende@gmail.com>2019-07-24 12:26:21 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-07-24 17:17:53 +0300
commitdb15b23745fd3ff72e0756949716299bdb67b443 (patch)
tree588cd60d12cd4df14ff5c1abfdda01ab89e79f9d
parent3c9a7d06522ef8b3b0157f397c4c01b695e42998 (diff)
Fix T67117: Font thumbnails crash to desktop
We were missing a null pointer check for invalid fonts.
-rw-r--r--source/blender/blenfont/intern/blf_glyph.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenfont/intern/blf_glyph.c b/source/blender/blenfont/intern/blf_glyph.c
index 049af7678d5..66be94aaa06 100644
--- a/source/blender/blenfont/intern/blf_glyph.c
+++ b/source/blender/blenfont/intern/blf_glyph.c
@@ -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 {