From 43e46a654fa7cf69f0c8bcb7f583008d96a98686 Mon Sep 17 00:00:00 2001 From: Alan Hourihane Date: Wed, 27 Feb 2008 16:58:21 +0000 Subject: Fix context sharing between direct/indirect contexts --- GL/glx/glxdri.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'GL') 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; } -- cgit v1.2.3