]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Fix a crash when playing q2bsp maps where t->currentframe is dereferenced, and it...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 20 Mar 2015 06:43:08 +0000 (06:43 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 20 Mar 2015 06:43:08 +0000 (06:43 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12207 d7cf8633-e32d-0410-b094-e92efae38249

gl_rmain.c
model_brush.c

index 50fca5992bd3dab5b0a5def378e6c12f7779ba81..9fe3087cfbd2960e9b87359c134f265ef0c6561a 100644 (file)
@@ -8431,7 +8431,7 @@ texture_t *R_GetCurrentTexture(texture_t *t)
                }
        }
 
-       return t->currentframe;
+       return t;
 }
 
 rsurfacestate_t rsurface;
index 6fd45ee75de43255a498c09a61b574287a017fc3..66cb6d0bac5465db8c88bc4cedf14ac6fc99d7fa 100644 (file)
@@ -4417,6 +4417,7 @@ static void Mod_Q2BSP_LoadTexinfo(sizebuf_t *sb)
        {
                int j;
                texture_t *t = loadmodel->data_textures + out->textureindex;
+               t->currentframe = t; // fix the reallocated pointer
 
                // if this is not animated, skip it
                // if this is already processed, skip it (part of an existing sequence)