From e88294328cb71dc32941556da5bd4ed40e8b95f1 Mon Sep 17 00:00:00 2001 From: Luca Barbieri Date: Sat, 16 Jan 2010 23:19:19 -0800 Subject: [PATCH] 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 --- src/glx/x11/glxcurrent.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/glx/x11/glxcurrent.c b/src/glx/x11/glxcurrent.c index fae1bd9..50de7d6 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 } -- 2.7.4