Mesa (mesa_7_5_branch): vbo: fix divide by zero exception

Brian Paul brianp at kemper.freedesktop.org
Mon Aug 24 18:44:47 UTC 2009


Module: Mesa
Branch: mesa_7_5_branch
Commit: b9b04872d526ed7955f647542399e110ace0325c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=b9b04872d526ed7955f647542399e110ace0325c

Author: Brian Paul <brianp at vmware.com>
Date:   Mon Aug 24 12:43:57 2009 -0600

vbo: fix divide by zero exception

Fixes bug 23489.

---

 src/mesa/vbo/vbo_exec_draw.c |    2 +-
 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 c53a4ee..98177a4 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) / 




More information about the mesa-commit mailing list