More checking for failed contexts/drawables
This commit is contained in:
parent
43e46a654f
commit
41aea6194b
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user