mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-30 18:00:24 +01:00
mesa: fix glDeleteBuffers() regression
This fixes a regression (failed assertion) from commit
c552f273f5 which was hit if glDeleteBuffers()
was called on a buffer that was never bound.
NOTE: this is a candidate for the 7.9 branch.
This commit is contained in:
parent
c552f273f5
commit
78587ea012
1 changed files with 2 additions and 2 deletions
|
|
@ -998,7 +998,7 @@ _mesa_DeleteBuffersARB(GLsizei n, const GLuint *ids)
|
|||
struct gl_array_object *arrayObj = ctx->Array.ArrayObj;
|
||||
GLuint j;
|
||||
|
||||
ASSERT(bufObj->Name == ids[i]);
|
||||
ASSERT(bufObj->Name == ids[i] || bufObj == &DummyBufferObject);
|
||||
|
||||
if (_mesa_bufferobj_mapped(bufObj)) {
|
||||
/* if mapped, unmap it now */
|
||||
|
|
@ -1039,7 +1039,7 @@ _mesa_DeleteBuffersARB(GLsizei n, const GLuint *ids)
|
|||
}
|
||||
|
||||
/* The ID is immediately freed for re-use */
|
||||
_mesa_HashRemove(ctx->Shared->BufferObjects, bufObj->Name);
|
||||
_mesa_HashRemove(ctx->Shared->BufferObjects, ids[i]);
|
||||
_mesa_reference_buffer_object(ctx, &bufObj, NULL);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue