fix leaked font fallbacks
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 12 Nov 2010 18:40:51 +0000 (18:40 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 12 Nov 2010 18:40:51 +0000 (18:40 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10589 d7cf8633-e32d-0410-b094-e92efae38249

ft2.c

diff --git a/ft2.c b/ft2.c
index 47958d7..640989b 100644 (file)
--- a/ft2.c
+++ b/ft2.c
@@ -956,6 +956,11 @@ static void UnloadMapRec(ft2_font_map_t *map)
 void Font_UnloadFont(ft2_font_t *font)
 {
        int i;
+
+       // unload fallbacks
+       if(font->next)
+               Font_UnloadFont(font->next);
+
        if (font->attachments && font->attachmentcount)
        {
                for (i = 0; i < font->attachmentcount; ++i) {