diff --git a/src/gallium/frontends/glx/xlib/glx_api.c b/src/gallium/frontends/glx/xlib/glx_api.c index 9ee3c94882b..e1d98369d09 100644 --- a/src/gallium/frontends/glx/xlib/glx_api.c +++ b/src/gallium/frontends/glx/xlib/glx_api.c @@ -1236,6 +1236,8 @@ glXMakeContextCurrent( Display *dpy, GLXDrawable draw, } else if (!ctx && !draw && !read) { /* release current context w/out assigning new one. */ + if (current) + current->currentDpy = NULL; XMesaMakeCurrent2( NULL, NULL, NULL ); SetCurrentContext(NULL); return True;