summaryrefslogtreecommitdiff
path: root/GL
diff options
context:
space:
mode:
authorAlan Hourihane <alanh@tungstengraphics.com>2008-02-27 16:49:34 +0000
committerAlan Hourihane <alanh@tungstengraphics.com>2008-02-27 16:53:52 +0000
commita65d4aed06acd839fb21153f74144498abda3e18 (patch)
tree0d8fbc0fca840c9ba6b1c8d8b4d085109520a130 /GL
parent44f46bfb981ca69515dafc520f62f33654711194 (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 685683dcc..09abca3f9 100644
--- a/GL/glx/glxdri.c
+++ b/GL/glx/glxdri.c
@@ -598,6 +598,9 @@ __glXDRIscreenCreateContext(__GLXscreen *baseScreen,
else
sharePrivate = NULL;
+ if (baseShareContext && baseShareContext->isDirect)
+ return NULL;
+
context = xalloc(sizeof *context);
if (context == NULL)
return NULL;
@@ -617,6 +620,11 @@ __glXDRIscreenCreateContext(__GLXscreen *baseScreen,
0, /* render type */
sharePrivate,
&context->driContext);
+
+ if (!context->driContext.private) {
+ xfree(context);
+ return NULL;
+ }
context->driContext.mode = modes;