From: havoc Date: Thu, 23 Oct 2008 10:47:59 +0000 (+0000) Subject: check GLTEXF_UPLOAD flag before deleting a texnum that may never have X-Git-Tag: xonotic-v0.1.0preview~2052 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=805396ae3fec89152dac6b21c8d6e8c6c6437d17;p=xonotic%2Fdarkplaces.git check GLTEXF_UPLOAD flag before deleting a texnum that may never have been allocated git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8537 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/gl_textures.c b/gl_textures.c index 0178133b..e5d35a9a 100644 --- a/gl_textures.c +++ b/gl_textures.c @@ -308,7 +308,7 @@ void R_FreeTexture(rtexture_t *rt) else Host_Error("R_FreeTexture: texture \"%s\" not linked in pool", glt->identifier); - if (glt->texnum > 0) + if (!(glt->flags & GLTEXF_UPLOAD)) { CHECKGLERROR qglDeleteTextures(1, (GLuint *)&glt->texnum);CHECKGLERROR