]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
don't try to free r_texture_whitecube just because it's stored in one of
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 22 May 2008 23:10:55 +0000 (23:10 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 22 May 2008 23:10:55 +0000 (23:10 +0000)
the cubemap references

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

r_shadow.c

index eb324479059227440d6cc95f9f1fa0fbeaf2c0c3..27b1ffb59da348300e7a772587f3c3eca1f5bd70 100644 (file)
@@ -3435,7 +3435,8 @@ void R_Shadow_FreeCubemaps(void)
        {
                if (developer_loading.integer)
                        Con_Printf("unloading cubemap \"%s\"\n", cubemaps[i].basename);
-               R_FreeTexture(cubemaps[i].texture);
+               if (cubemaps[i].texture != r_texture_whitecube)
+                       R_FreeTexture(cubemaps[i].texture);
        }
 
        numcubemaps = 0;