]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
free the data allocated by font rendering, even if the image is not to be used
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 4 May 2011 05:02:07 +0000 (05:02 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 4 May 2011 05:02:07 +0000 (05:02 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11102 d7cf8633-e32d-0410-b094-e92efae38249

ft2.c

diff --git a/ft2.c b/ft2.c
index 376072622a8364c9b0ece9bc06425ea9ccbdcc29..4a220cd948e710700176a4081880ed8157100f9a 100644 (file)
--- a/ft2.c
+++ b/ft2.c
@@ -1538,9 +1538,11 @@ static qboolean Font_LoadMap(ft2_font_t *font, ft2_font_map_t *mapstart, Uchar _
                        if (r_font_compress.integer && qglGetCompressedTexImageARB && tex)
                                R_SaveTextureDDSFile(tex, va("dds/%s.dds", map_identifier), r_texture_dds_save.integer < 2, true);
                }
-               Mem_Free(data);
        }
 
+       if(data)
+               Mem_Free(data);
+
        if (map->pic->tex == r_texture_notexture)
        {
                // if the first try isn't successful, keep it with a broken texture