From 4d9fb0c2df58dadcec9e5d2fe3b4fab57753bf60 Mon Sep 17 00:00:00 2001 From: divverent Date: Wed, 4 May 2011 05:02:07 +0000 Subject: [PATCH] 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 --- ft2.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- 2.39.2