text-freetype2: Remove null pointer dereference

This commit is contained in:
jp9000 2014-11-10 01:16:39 -08:00
parent f199e2c096
commit ce99829d01

View File

@ -235,7 +235,7 @@ void cache_glyphs(struct ft2_source *srcdata, wchar_t *cache_glyphs)
FT_GlyphSlot slot;
FT_UInt glyph_index = 0;
if (!srcdata->font_face)
if (!srcdata->font_face || !cache_glyphs)
return;
slot = srcdata->font_face->glyph;