summaryrefslogtreecommitdiff
path: root/src/mesa/vbo
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-08-24 12:43:57 -0600
committerBrian Paul <brianp@vmware.com>2009-08-24 13:05:20 -0600
commit93aa0fd81c44c7a5f29f30e8f730e060597b06ad (patch)
tree0c72e5fe60afab26a910f578ca04e445030815d9 /src/mesa/vbo
parent0a24e5011171d71ae88ef0a43b4625ea8d37a917 (diff)
vbo: fix divide by zero exception
Fixes bug 23489.
Diffstat (limited to 'src/mesa/vbo')
-rw-r--r--src/mesa/vbo/vbo_exec_draw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/vbo/vbo_exec_draw.c b/src/mesa/vbo/vbo_exec_draw.c
index d76c45f356..625452ac09 100644
--- a/src/mesa/vbo/vbo_exec_draw.c
+++ b/src/mesa/vbo/vbo_exec_draw.c
@@ -398,7 +398,7 @@ vbo_exec_vtx_flush( struct vbo_exec_context *exec, GLboolean unmap )
vbo_exec_vtx_unmap( exec );
}
- if (unmap)
+ if (unmap || exec->vtx.vertex_size == 0)
exec->vtx.max_vert = 0;
else
exec->vtx.max_vert = ((VBO_VERT_BUFFER_SIZE - exec->vtx.buffer_used) /