From: Brian Paul Date: Mon, 22 Jun 2009 23:49:22 +0000 (-0600) Subject: st/mesa: fix setup_edgeflags() regression X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a31118c25a0e2b95008683ca4be2ca635f0dbfa4;p=mesa.git 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. --- diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c index 8e036223c65..914a507bef6 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)