diff options
author | Alan Hourihane <alanh@tungstengraphics.com> | 2008-02-27 16:49:34 +0000 |
---|---|---|
committer | Alan Hourihane <alanh@tungstengraphics.com> | 2008-02-27 16:51:31 +0000 |
commit | 817b20030b073f9e92c77c0f6887d080c99ae6df (patch) | |
tree | d0e916b759849c2cbc24ecd33ef4a4f05830567f | |
parent | dcc3de91d2b80be98e4488df29ec6b551c7ff6d1 (diff) |
Fix context sharing between direct/indirect contexts
-rw-r--r-- | GL/glx/glxdri.c | 9 |
1 files changed, 8 insertions, 1 deletions
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"); |