From 805396ae3fec89152dac6b21c8d6e8c6c6437d17 Mon Sep 17 00:00:00 2001 From: havoc Date: Thu, 23 Oct 2008 10:47:59 +0000 Subject: [PATCH] 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 --- gl_textures.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.39.2