[ruamoko] Free fonts on shutdown

I guess I had figured out how to free fonts sometime after writing
rua_gui.c.
This commit is contained in:
Bill Currie 2024-01-04 16:29:43 +09:00
parent 9b0589f7e5
commit 871d8729f5

View file

@ -155,6 +155,10 @@ static void
font_free (gui_resources_t *res, rua_font_t *font)
{
qfZoneScoped (true);
if (font->next) {
font->next->prev = font->prev;
}
*font->prev = font->next;
PR_RESFREE (res->font_map, font);
}
@ -221,7 +225,7 @@ bi_gui_clear (progs_t *pr, void *_res)
rua_font_t *font;
for (font = res->fonts; font; font = font->next) {
//FIXME can't unload fonts
Font_Free (font->font);
}
res->fonts = 0;
font_reset (res);