]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - gl_textures.c
don't pass a texnum of -1 to glDeleteTextures during shutdown, this has
[xonotic/darkplaces.git] / gl_textures.c
index 2ef60566c39c1266da980e7c9161b87f10276205..2ad1a2e0f08ae74093f478e1f67dec0afc8e925e 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)
+       if (glt->texnum > 0)
        {
                CHECKGLERROR
                qglDeleteTextures(1, (GLuint *)&glt->texnum);CHECKGLERROR