]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Free the data of each font attachment in Font_UnloadFont
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 12 Nov 2010 18:40:44 +0000 (18:40 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 12 Nov 2010 18:40:44 +0000 (18:40 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10587 d7cf8633-e32d-0410-b094-e92efae38249

ft2.c

diff --git a/ft2.c b/ft2.c
index 9f7c36800d747c27feb7aa0d4b934f19e6fcc421..f5efcabbe30fb94465342df445ed522b4ccf499b 100644 (file)
--- a/ft2.c
+++ b/ft2.c
@@ -957,6 +957,10 @@ void Font_UnloadFont(ft2_font_t *font)
        int i;
        if (font->attachments && font->attachmentcount)
        {
+               for (i = 0; i < font->attachmentcount; ++i) {
+                       if (font->attachments[i].data)
+                               Mem_Free(font->attachments[i].data);
+               }
                Mem_Free(font->attachments);
                font->attachmentcount = 0;
                font->attachments = NULL;