mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
(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:
parent
20b5fb056f
commit
4c4cdd49c6
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user