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.
This commit is contained in:
Brian Paul 2009-06-22 17:49:22 -06:00
parent 7a879500ac
commit a31118c25a

View file

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