diff options
author | Brian Paul <[email protected]> | 2004-09-14 22:28:27 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2004-09-14 22:28:27 +0000 |
commit | 765f1a12c6256282fe175ec92a0d01b45e4322c7 (patch) | |
tree | 0f338633fea0bcf7f84abecb201f83949602d87e /src/mesa/main/bufferobj.c | |
parent | 8de924dbb0447579fa455c94a1e410c69e5ce4b5 (diff) |
also fix possible delete bugs with buffer objects and vertex/fragment programs
Diffstat (limited to 'src/mesa/main/bufferobj.c')
-rw-r--r-- | src/mesa/main/bufferobj.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index 998228e8008..84af8158ad2 100644 --- a/src/mesa/main/bufferobj.c +++ b/src/mesa/main/bufferobj.c @@ -1,6 +1,6 @@ /* * Mesa 3-D graphics library - * Version: 6.1 + * Version: 6.2 * * Copyright (C) 1999-2004 Brian Paul All Rights Reserved. * @@ -592,8 +592,11 @@ _mesa_DeleteBuffersARB(GLsizei n, const GLuint *ids) } /* decrement refcount and delete if <= 0 */ - bufObj->DeletePending = GL_TRUE; - bufObj->RefCount--; + if (!bufObj->DeletePending) { + bufObj->DeletePending = GL_TRUE; + bufObj->RefCount--; + } + if (bufObj->RefCount <= 0) { /* buffer should not be bound anymore! */ ASSERT(ctx->Array.ArrayBufferObj != bufObj); |