Prevent null pointer dereference

This commit is contained in:
twinaphex 2019-07-18 21:00:35 +02:00
parent 61746c8179
commit 44efbd47c2

View File

@ -69,7 +69,11 @@ static void gl_raster_font_free_font(void *data,
if (is_threaded)
video_context_driver_make_current(true);
glDeleteTextures(1, &font->tex);
if (font->tex)
{
glDeleteTextures(1, &font->tex);
font->tex = 0;
}
free(font);
}