diff options
author | marha <marha@users.sourceforge.net> | 2012-02-23 12:37:25 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-02-23 12:37:25 +0100 |
commit | 1b73fdf9c9aa2330380300d204fb47f512cfb6e2 (patch) | |
tree | 9e3cfdefdbcb948c28695741b991bd5698e96480 /xorg-server/glx/glxcmds.c | |
parent | c28585804e57d3da878c640be1369eed784ce52b (diff) | |
download | vcxsrv-1b73fdf9c9aa2330380300d204fb47f512cfb6e2.tar.gz vcxsrv-1b73fdf9c9aa2330380300d204fb47f512cfb6e2.tar.bz2 vcxsrv-1b73fdf9c9aa2330380300d204fb47f512cfb6e2.zip |
Solved possible crashes when drawable cannot be created.
Diffstat (limited to 'xorg-server/glx/glxcmds.c')
-rw-r--r-- | xorg-server/glx/glxcmds.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/xorg-server/glx/glxcmds.c b/xorg-server/glx/glxcmds.c index ee3f94dfb..b88d6f663 100644 --- a/xorg-server/glx/glxcmds.c +++ b/xorg-server/glx/glxcmds.c @@ -499,6 +499,12 @@ __glXGetDrawable(__GLXcontext *glxc, GLXDrawable drawId, ClientPtr client, pDraw, drawId, GLX_DRAWABLE_WINDOW, drawId, glxc->config); + if (!pGlxDraw) + { + client->errorValue = drawId; + *error = BadMatch; + return NULL; + } /* since we are creating the drawablePrivate, drawId should be new */ if (!AddResource(drawId, __glXDrawableRes, pGlxDraw)) { |