glx: Set GL context to null in __glXSetCurrentContextNull
authorLuca Barbieri <luca@luca-barbieri.com>
Sun, 17 Jan 2010 07:19:19 +0000 (23:19 -0800)
committerBrian Paul <brianp@vmware.com>
Tue, 19 Jan 2010 15:59:37 +0000 (08:59 -0700)
__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 <brianp@vmware.com>
src/glx/x11/glxcurrent.c

index fae1bd9..50de7d6 100644 (file)
@@ -162,6 +162,7 @@ __glXSetCurrentContextNull(void)
    __glXSetCurrentContext(&dummyContext);
 #ifdef GLX_DIRECT_RENDERING
    _glapi_set_dispatch(NULL);   /* no-op functions */
+   _glapi_set_context(NULL);
 #endif
 }