mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-25 01:20:05 +01:00
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
1 changed files with 4 additions and 0 deletions
|
|
@ -515,6 +515,10 @@ __glXGetDrawable(__GLXcontext * glxc, GLXDrawable drawId, ClientPtr client,
|
|||
pDraw, drawId,
|
||||
GLX_DRAWABLE_WINDOW,
|
||||
drawId, glxc->config);
|
||||
if (!pGlxDraw) {
|
||||
*error = BadAlloc;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* since we are creating the drawablePrivate, drawId should be new */
|
||||
if (!AddResource(drawId, __glXDrawableRes, pGlxDraw)) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue