vbo: fix divide by zero exception

Fixes bug 23489.
This commit is contained in:
Brian Paul
2009-08-24 12:43:57 -06:00
parent 0a24e50111
commit 93aa0fd81c

View File

@@ -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) /