glx: Catch another failure case in drawable creation
Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
parent
c3c976f54c
commit
abd0865021
|
@ -515,6 +515,10 @@ __glXGetDrawable(__GLXcontext * glxc, GLXDrawable drawId, ClientPtr client,
|
||||||
pDraw, drawId,
|
pDraw, drawId,
|
||||||
GLX_DRAWABLE_WINDOW,
|
GLX_DRAWABLE_WINDOW,
|
||||||
drawId, glxc->config);
|
drawId, glxc->config);
|
||||||
|
if (!pGlxDraw) {
|
||||||
|
*error = BadAlloc;
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
/* since we are creating the drawablePrivate, drawId should be new */
|
/* since we are creating the drawablePrivate, drawId should be new */
|
||||||
if (!AddResource(drawId, __glXDrawableRes, pGlxDraw)) {
|
if (!AddResource(drawId, __glXDrawableRes, pGlxDraw)) {
|
||||||
|
|
Loading…
Reference in New Issue