summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-05-07 09:46:53 -0600
committerBrian Paul <[email protected]>2009-05-07 09:46:53 -0600
commit9a4890dac783cba7572e8146b455f234144f3866 (patch)
treeb0c5370bf9a00e60d74270e65d66427edd576d4f /src/mesa/main
parent3d048e57504c63999aeaaf5a65e8e493e6a67ff7 (diff)
parent6a3004b9ae58dafd1ce995df78b0f3183827a59d (diff)
Merge branch 'mesa_7_5_branch'
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);
}