]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
check GLTEXF_UPLOAD flag before deleting a texnum that may never have
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 23 Oct 2008 10:47:59 +0000 (10:47 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 23 Oct 2008 10:47:59 +0000 (10:47 +0000)
been allocated

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8537 d7cf8633-e32d-0410-b094-e92efae38249

gl_textures.c

index 0178133b2d5087972b3491872a3a13a1b14519f6..e5d35a9ac4f264221550d8e6f9a48632c1fd57bc 100644 (file)
@@ -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