summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-05-07 09:36:21 -0600
committerBrian Paul <[email protected]>2009-05-07 09:36:21 -0600
commitcc7170464493453ec8213decd21df95121b236e2 (patch)
tree78ddc55c3f1ad83ac39040337a065c67fdbf1ac0 /src/mesa/main
parent79ada8c6331a801a0475f38a540670b14e168f19 (diff)
mesa: unmap buffer objects during context tear-down
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/shared.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/main/shared.c b/src/mesa/main/shared.c
index 193ac8970cf..ae8dd2a8364 100644
--- a/src/mesa/main/shared.c
+++ b/src/mesa/main/shared.c
@@ -190,6 +190,10 @@ delete_bufferobj_cb(GLuint id, void *data, void *userData)
{
struct gl_buffer_object *bufObj = (struct gl_buffer_object *) data;
GLcontext *ctx = (GLcontext *) userData;
+ if (bufObj->Pointer) {
+ ctx->Driver.UnmapBuffer(ctx, 0, bufObj);
+ bufObj->Pointer = NULL;
+ }
ctx->Driver.DeleteBuffer(ctx, bufObj);
}