aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-02-27 13:10:45 -0700
committerBrian Paul <[email protected]>2009-02-27 13:10:45 -0700
commit67025f789324163a69771436e852975d3acbcd86 (patch)
treed65841d8931f6a42594a46e471ccd1c362e5418d /src/mesa
parenta7f434b486187129ae8d5507170c42a9ce750258 (diff)
mesa: set bufObj->Pointer = NULL after unmapping
Also, ctx->Driver.UnmapBuffer can never be null, so remove conditional.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/bufferobj.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index 8df0a5b1a1e..c8d160baa9a 100644
--- a/src/mesa/main/bufferobj.c
+++ b/src/mesa/main/bufferobj.c
@@ -796,6 +796,8 @@ _mesa_DeleteBuffersARB(GLsizei n, const GLuint *ids)
if (bufObj->Pointer) {
/* if mapped, unmap it now */
ctx->Driver.UnmapBuffer(ctx, 0, bufObj);
+ bufObj->Access = DEFAULT_ACCESS;
+ bufObj->Pointer = NULL;
}
/* unbind any vertex pointers bound to this buffer */
@@ -1069,10 +1071,7 @@ _mesa_UnmapBufferARB(GLenum target)
return GL_FALSE;
}
- if (ctx->Driver.UnmapBuffer) {
- status = ctx->Driver.UnmapBuffer( ctx, target, bufObj );
- }
-
+ status = ctx->Driver.UnmapBuffer( ctx, target, bufObj );
bufObj->Access = DEFAULT_ACCESS;
bufObj->Pointer = NULL;