summaryrefslogtreecommitdiff
path: root/GL
diff options
context:
space:
mode:
authorAlan Hourihane <alanh@tungstengraphics.com>2008-02-27 16:58:21 +0000
committerAlan Hourihane <alanh@tungstengraphics.com>2008-02-27 16:58:21 +0000
commit43e46a654fa7cf69f0c8bcb7f583008d96a98686 (patch)
treebaf5f2109e620b20e62f5b8ed37fa546782e6e2a /GL
parentd74b0327e8355546e6b41e8ce684f461d65fa9dc (diff)
Fix context sharing between direct/indirect contexts
Diffstat (limited to 'GL')
-rw-r--r--GL/glx/glxdri.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/GL/glx/glxdri.c b/GL/glx/glxdri.c
index f51a5310d..613ac05f1 100644
--- a/GL/glx/glxdri.c
+++ b/GL/glx/glxdri.c
@@ -614,6 +614,9 @@ __glXDRIscreenCreateContext(__GLXscreen *baseScreen,
else
driShare = NULL;
+ if (baseShareContext && baseShareContext->isDirect)
+ return NULL;
+
context = xalloc(sizeof *context);
if (context == NULL)
return NULL;
@@ -649,6 +652,11 @@ __glXDRIscreenCreateContext(__GLXscreen *baseScreen,
hwContext,
&context->driContext);
+ if (context->driContext.private == NULL) {
+ xfree(context);
+ return NULL;
+ }
+
return &context->base;
}