added null VB->AttribPtr[i] check

This commit is contained in:
Brian 2007-08-17 15:38:29 +01:00
parent bc3f87683a
commit 8e4ed6323d

View 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++) {