From 817b20030b073f9e92c77c0f6887d080c99ae6df Mon Sep 17 00:00:00 2001 From: Alan Hourihane Date: Wed, 27 Feb 2008 16:49:34 +0000 Subject: Fix context sharing between direct/indirect contexts --- GL/glx/glxdri.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/GL/glx/glxdri.c b/GL/glx/glxdri.c index 788b87d79..6d5d9d71e 100644 --- a/GL/glx/glxdri.c +++ b/GL/glx/glxdri.c @@ -472,6 +472,9 @@ __glXDRIscreenCreateContext(__GLXscreen *baseScreen, else sharePrivate = NULL; + if (baseShareContext && baseShareContext->isDirect) + return NULL; + context = xalloc(sizeof *context); if (context == NULL) return NULL; @@ -490,6 +493,11 @@ __glXDRIscreenCreateContext(__GLXscreen *baseScreen, 0, /* render type */ sharePrivate, &context->driContext); + + if (!context->driContext.private) { + xfree(context); + return NULL; + } context->driContext.mode = modes; @@ -815,7 +823,6 @@ static Bool glxDRIEnterVT (int index, int flags) { __GLXDRIscreen *screen = (__GLXDRIscreen *) __glXgetActiveScreen(index); - Bool ret; LogMessage(X_INFO, "AIGLX: Resuming AIGLX clients after VT switch\n"); -- cgit v1.2.3