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:53:52 +0000 |
commit | a65d4aed06acd839fb21153f74144498abda3e18 (patch) | |
tree | 0d8fbc0fca840c9ba6b1c8d8b4d085109520a130 /GL | |
parent | 44f46bfb981ca69515dafc520f62f33654711194 (diff) |
Fix context sharing between direct/indirect contexts
Diffstat (limited to 'GL')
-rw-r--r-- | GL/glx/glxdri.c | 8 |
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; |