summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/draw.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/draw.c')
-rw-r--r--src/mesa/main/draw.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/main/draw.c b/src/mesa/main/draw.c
index 5bb254e00d2..53946a72b20 100644
--- a/src/mesa/main/draw.c
+++ b/src/mesa/main/draw.c
@@ -917,7 +917,8 @@ _mesa_DrawRangeElementsBaseVertex(GLenum mode, GLuint start, GLuint end,
"(start %u, end %u, type 0x%x, count %d) ElemBuf %u, "
"base %d\n",
start, end, type, count,
- ctx->Array.VAO->IndexBufferObj->Name, basevertex);
+ ctx->Array.VAO->IndexBufferObj ?
+ ctx->Array.VAO->IndexBufferObj->Name : 0, basevertex);
}
if ((int) start + basevertex < 0 || end + basevertex >= max_element)