summaryrefslogtreecommitdiff
path: root/src/mesa/vbo
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/vbo')
-rw-r--r--src/mesa/vbo/vbo_exec_array.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c
index fdb501815d..a4c67c1de1 100644
--- a/src/mesa/vbo/vbo_exec_array.c
+++ b/src/mesa/vbo/vbo_exec_array.c
@@ -352,10 +352,11 @@ vbo_exec_DrawRangeElements(GLenum mode,
if (!_mesa_validate_DrawRangeElements( ctx, mode, start, end, count, type, indices ))
return;
- if (end >= ctx->Array._MaxElement) {
+ if (end >= ctx->Array.ArrayObj->_MaxElement) {
/* the max element is out of bounds of one or more enabled arrays */
_mesa_warning(ctx, "glDraw[Range]Elements() index=%u is "
- "out of bounds (max=%u)", end, ctx->Array._MaxElement);
+ "out of bounds (max=%u)", end,
+ ctx->Array.ArrayObj->_MaxElement);
return;
}