From: divverent Date: Wed, 4 May 2011 05:02:07 +0000 (+0000) Subject: free the data allocated by font rendering, even if the image is not to be used X-Git-Tag: xonotic-v0.5.0~223 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=4d9fb0c2df58dadcec9e5d2fe3b4fab57753bf60;p=xonotic%2Fdarkplaces.git free the data allocated by font rendering, even if the image is not to be used git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11102 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=4f09c5de78d1b37e4ec7cb2cd1b6016db5bce56f --- diff --git a/ft2.c b/ft2.c index 37607262..4a220cd9 100644 --- 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