From cc7170464493453ec8213decd21df95121b236e2 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 7 May 2009 09:36:21 -0600 Subject: [PATCH] mesa: unmap buffer objects during context tear-down --- src/mesa/main/shared.c | 4 ++++ 1 file changed, 4 insertions(+) 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); } -- 2.30.2