summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mesa/state_tracker/st_draw.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c
index ed3ae3e91a2..7cf06da43cc 100644
--- a/src/mesa/state_tracker/st_draw.c
+++ b/src/mesa/state_tracker/st_draw.c
@@ -584,6 +584,9 @@ st_draw_vbo(GLcontext *ctx,
pipe->set_vertex_buffers(pipe, num_vbuffers, vbuffer);
pipe->set_vertex_elements(pipe, num_velements, velements);
+ if (num_vbuffers == 0 || num_velements == 0)
+ return;
+
/* do actual drawing */
if (ib) {
/* indexed primitive */