From b9b04872d526ed7955f647542399e110ace0325c Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 24 Aug 2009 12:43:57 -0600 Subject: [PATCH] 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 c53a4eee00c..98177a41750 100644 --- a/src/mesa/vbo/vbo_exec_draw.c +++ b/src/mesa/vbo/vbo_exec_draw.c @@ -383,7 +383,7 @@ void vbo_exec_vtx_flush( struct vbo_exec_context *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) / -- 2.30.2