From a31118c25a0e2b95008683ca4be2ca635f0dbfa4 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 22 Jun 2009 17:49:22 -0600 Subject: st/mesa: fix setup_edgeflags() regression stobj is now non-null for the default/null buffer object. Update the test to check the buffer ID to see if it's a real buffer object. --- src/mesa/state_tracker/st_draw.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/mesa/state_tracker') diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c index 8e036223c6..914a507bef 100644 --- a/src/mesa/state_tracker/st_draw.c +++ b/src/mesa/state_tracker/st_draw.c @@ -229,8 +229,10 @@ setup_edgeflags(GLcontext *ctx, GLenum primMode, GLint start, GLint count, struct st_buffer_object *stobj = st_buffer_object(array->BufferObj); ubyte *map; - if (!stobj) + if (!stobj || stobj->Base.Name == 0) { + /* edge flags are not in a VBO */ return NULL; + } vec = (unsigned *) _mesa_calloc(sizeof(unsigned) * ((count + 31) / 32)); if (!vec) -- cgit v1.2.3