mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-04 07:00:11 +01:00
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:
parent
7a879500ac
commit
a31118c25a
1 changed files with 3 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue