mesa: added texcoord unit assertion
authorBrian Paul <brianp@vmware.com>
Wed, 3 Feb 2010 20:24:43 +0000 (13:24 -0700)
committerBrian Paul <brianp@vmware.com>
Wed, 3 Feb 2010 22:48:42 +0000 (15:48 -0700)
src/mesa/main/varray.c

index 0b6295d5e162b44bdc0e56cda7d54b508354ca01..818ed792e3bc9f18a1f6c67e6fea5ee16e468893 100644 (file)
@@ -475,6 +475,8 @@ _mesa_TexCoordPointer(GLint size, GLenum type, GLsizei stride,
          return;
    }
 
+   ASSERT(unit < Elements(ctx->Array.ArrayObj->TexCoord));
+
    update_array(ctx, &ctx->Array.ArrayObj->TexCoord[unit],
                 _NEW_ARRAY_TEXCOORD(unit),
                 elementSize, size, type, GL_RGBA, stride, GL_FALSE, ptr);