From: Luca Barbieri Date: Sun, 17 Jan 2010 07:19:19 +0000 (-0800) Subject: glx: Set GL context to null in __glXSetCurrentContextNull X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e88294328cb71dc32941556da5bd4ed40e8b95f1;p=mesa.git glx: Set GL context to null in __glXSetCurrentContextNull __glXSetCurrentContextNull currently does not set the GL context to null in the direct rendering case. This can result in a segfault trying to flush an invalid old context in glXMakeCurrent. This fixes a crash starting the Unigine demos (they still don't work due to missing extensions though). Signed-off-by: Brian Paul --- diff --git a/src/glx/x11/glxcurrent.c b/src/glx/x11/glxcurrent.c index fae1bd9fa62..50de7d612b8 100644 --- a/src/glx/x11/glxcurrent.c +++ b/src/glx/x11/glxcurrent.c @@ -162,6 +162,7 @@ __glXSetCurrentContextNull(void) __glXSetCurrentContext(&dummyContext); #ifdef GLX_DIRECT_RENDERING _glapi_set_dispatch(NULL); /* no-op functions */ + _glapi_set_context(NULL); #endif }