From 93aa0fd81c44c7a5f29f30e8f730e060597b06ad Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 24 Aug 2009 12:43:57 -0600 Subject: vbo: fix divide by zero exception Fixes bug 23489. --- src/mesa/vbo/vbo_exec_draw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) / -- cgit v1.2.3