OSDN Git Service

added null VB->AttribPtr[i] check
authorBrian <brian.paul@tungstengraphics.com>
Fri, 17 Aug 2007 14:38:29 +0000 (15:38 +0100)
committerBrian <brian.paul@tungstengraphics.com>
Fri, 17 Aug 2007 14:38:29 +0000 (15:38 +0100)
src/mesa/tnl/t_vp_build.c

index ee1a249..eb5e176 100644 (file)
@@ -146,7 +146,7 @@ static struct state_key *make_state_key( GLcontext *ctx )
       }
 
       for (i = _TNL_FIRST_MAT; i <= _TNL_LAST_MAT; i++) 
-        if (VB->AttribPtr[i]->stride) 
+        if (VB->AttribPtr[i] && VB->AttribPtr[i]->stride) 
            key->light_material_mask |= 1<<(i-_TNL_ATTRIB_MAT_FRONT_AMBIENT);
 
       for (i = 0; i < MAX_LIGHTS; i++) {