From 41aea6194bd29ab34cc166b3fd90eee64299ddf8 Mon Sep 17 00:00:00 2001 From: Alan Hourihane Date: Wed, 27 Feb 2008 17:06:27 +0000 Subject: More checking for failed contexts/drawables --- GL/glx/glxdri.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'GL') diff --git a/GL/glx/glxdri.c b/GL/glx/glxdri.c index 613ac05f1..f9b28e427 100644 --- a/GL/glx/glxdri.c +++ b/GL/glx/glxdri.c @@ -653,6 +653,9 @@ __glXDRIscreenCreateContext(__GLXscreen *baseScreen, &context->driContext); if (context->driContext.private == NULL) { + __glXenterServer(GL_FALSE); + retval = DRIDestroyContext(baseScreen->pScreen, context->hwContextID); + __glXleaveServer(GL_FALSE); xfree(context); return NULL; } @@ -703,6 +706,14 @@ __glXDRIscreenCreateDrawable(__GLXscreen *screen, &private->driDrawable, hwDrawable, 0, NULL); + if (private->driDrawable.private == NULL) { + __glXenterServer(GL_FALSE); + DRIDestroyDrawable(screen->pScreen, serverClient, pDraw); + __glXleaveServer(GL_FALSE); + xfree(private); + return NULL; + } + return &private->base; } -- cgit v1.2.3