diff options
author | Brian Paul <brianp@vmware.com> | 2009-05-22 07:51:35 -0600 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2009-05-22 07:51:35 -0600 |
commit | a545f1ab6d50e044c6e0b2d952af28e6d9059f80 (patch) | |
tree | e11e9e1444a9641a71c34529b998474ba33307df /src/mesa/main | |
parent | 42ae2a8648923b6fa11e29ad0f6ff7555534e390 (diff) |
mesa: added some assertions
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/enable.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c index 2e7baa48ff..48268fcd27 100644 --- a/src/mesa/main/enable.c +++ b/src/mesa/main/enable.c @@ -119,6 +119,7 @@ client_state(GLcontext *ctx, GLenum cap, GLboolean state) CHECK_EXTENSION(NV_vertex_program, cap); { GLint n = (GLint) cap - GL_VERTEX_ATTRIB_ARRAY0_NV; + ASSERT(n < Elements(ctx->Array.ArrayObj->VertexAttrib)); var = &ctx->Array.ArrayObj->VertexAttrib[n].Enabled; flag = _NEW_ARRAY_ATTRIB(n); } @@ -1316,6 +1317,7 @@ _mesa_IsEnabled( GLenum cap ) CHECK_EXTENSION(NV_vertex_program); { GLint n = (GLint) cap - GL_VERTEX_ATTRIB_ARRAY0_NV; + ASSERT(n < Elements(ctx->Array.ArrayObj->VertexAttrib)); return (ctx->Array.ArrayObj->VertexAttrib[n].Enabled != 0); } case GL_MAP1_VERTEX_ATTRIB0_4_NV: |