summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/context.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index c62575c08ab..80bee16d453 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -1651,6 +1651,10 @@ _mesa_make_current( struct gl_context *newCtx,
if (!newCtx) {
_glapi_set_dispatch(NULL); /* none current */
+ if (curCtx) {
+ _mesa_reference_framebuffer(&curCtx->WinSysDrawBuffer, NULL);
+ _mesa_reference_framebuffer(&curCtx->WinSysReadBuffer, NULL);
+ }
}
else {
_glapi_set_dispatch(newCtx->CurrentDispatch);