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 <brianp@vmware.com>
This commit is contained in:
Luca Barbieri
2010-01-16 23:19:19 -08:00
committed by Brian Paul
parent 7a39a5c1cb
commit e88294328c
+1
View 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
}