This fixes surface leak when no winsys buffers are bound. Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Brian Paul <brianp@vmware.com>tags/19.2-branchpoint
@@ -1765,6 +1765,10 @@ _mesa_make_current( struct gl_context *newCtx, | |||
check_init_viewport(newCtx, drawBuffer->Width, drawBuffer->Height); | |||
} | |||
else { | |||
_mesa_reference_framebuffer(&newCtx->WinSysDrawBuffer, NULL); | |||
_mesa_reference_framebuffer(&newCtx->WinSysReadBuffer, NULL); | |||
} | |||
if (newCtx->FirstTimeCurrent) { | |||
handle_first_current(newCtx); |