(iOS/others) gl_raster_font_get_glyph - prevent a crash when

font driver has not yet been initialized and ident is NULL
This commit is contained in:
Twinaphex 2015-04-22 23:38:42 +02:00
parent 20b5fb056f
commit 4c4cdd49c6

View File

@ -366,8 +366,10 @@ static const struct font_glyph *gl_raster_font_get_glyph(
{
gl_raster_t *font = (gl_raster_t*)data;
if (!font)
if (!font || !font->font_driver)
return NULL;
if (!font->font_driver->ident)
return NULL;
return font->font_driver->get_glyph((void*)font->font_driver, code);
}