From 97dedfda5fbb4078db28519e50adeeeb8e1a1dc1 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 10 Nov 2011 09:47:37 -0700 Subject: vbo: better handling of VBO allocation failures Previously, if we failed to allocate a VBO (either for display list compilation or immediate mode rendering) we'd eventually segfault when trying to map the non-existant buffer or in a glVertex/Color/etc call when we hit a null pointer. Now we don't try to map non-existant buffers and if we do fail to allocate a VBO we plug in no-op functions for glVertex/Color/etc so we don't segfault. --- src/mesa/vbo/vbo_exec.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/mesa/vbo/vbo_exec.h') diff --git a/src/mesa/vbo/vbo_exec.h b/src/mesa/vbo/vbo_exec.h index 0b72579a82c..8d6b8f95a7f 100644 --- a/src/mesa/vbo/vbo_exec.h +++ b/src/mesa/vbo/vbo_exec.h @@ -82,6 +82,7 @@ struct vbo_exec_context { struct gl_context *ctx; GLvertexformat vtxfmt; + GLvertexformat vtxfmt_noop; struct { struct gl_buffer_object *bufferobj; -- cgit v1.2.3