]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - gl_textures.c
removed a few CheckSentinelsGlobal calls to get a loading speedup
[xonotic/darkplaces.git] / gl_textures.c
index 50390ce9f99574d736ba9067bd465c172860db22..c1682318796c6408079bdf5c64d4b871d54419c2 100644 (file)
@@ -208,11 +208,14 @@ static void R_FreeTexture(gltexture_t *glt)
        gltextureimage_t *image, **gltimagepointer;
        GLuint texnum;
 
+       if (glt == NULL)
+               Host_Error("R_FreeTexture: texture == NULL\n");
+
        for (gltpointer = &glt->pool->gltchain;*gltpointer && *gltpointer != glt;gltpointer = &(*gltpointer)->chain);
        if (*gltpointer == glt)
                *gltpointer = glt->chain;
        else
-               Host_Error("R_FreeTexture: texture not linked in pool\n");
+               Host_Error("R_FreeTexture: texture \"%s\" not linked in pool\n", glt->identifier);
 
        // note: if freeing a fragment texture, this will not make the claimed
        // space available for new textures unless all other fragments in the
@@ -1443,7 +1446,7 @@ rtexture_t *R_ProceduralTexture (rtexturepool_t *rtexturepool, char *identifier,
                        Con_Printf("R_LoadTexture: exact match with existing texture %s\n", identifier);
                        return (rtexture_t *)glt; // exact match, use existing
                }
-               Con_DPrintf("R_LoadTexture: cache mismatch, replacing old texture\n");
+               Con_Printf("R_LoadTexture: cache mismatch, replacing old texture\n");
                R_FreeTexture(glt);
        }