diff options
-rw-r--r-- | src/mesa/main/shared.c | 4 |
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); } |