summaryrefslogtreecommitdiff
path: root/GL/glx/glxdri.c
diff options
context:
space:
mode:
Diffstat (limited to 'GL/glx/glxdri.c')
-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;
}