diff options
author | Brian Paul <[email protected]> | 2009-06-22 17:49:22 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2009-06-22 17:49:22 -0600 |
commit | a31118c25a0e2b95008683ca4be2ca635f0dbfa4 (patch) | |
tree | 2c67e1f4238164e31d8b4db6a69c6f6fe8f20606 /src/mesa/state_tracker | |
parent | 7a879500ac465104e330d431c7d8a0b640153100 (diff) |
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.
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r-- | src/mesa/state_tracker/st_draw.c | 4 |
1 files changed, 3 insertions, 1 deletions
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) |