Commit 12bf7cfe authored by Charmaine Lee's avatar Charmaine Lee

mesa: unreference current winsys buffers when unbinding winsys buffers

This fixes surface leak when no winsys buffers are bound.

Reviewed-by: Brian Paul's avatarBrian Paul <>
parent b480adfa
Pipeline #37878 passed with stages
in 8 minutes and 20 seconds
......@@ -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) {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment