Signed-off-by: Adam Jackson <[email protected]>
---
 glx/glxcmds.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/glx/glxcmds.c b/glx/glxcmds.c
index 9deadb7..0ab2ed5 100644
--- a/glx/glxcmds.c
+++ b/glx/glxcmds.c
@@ -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)) {
-- 
1.8.3.1

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to