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/glxdriswrast.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/glxdriswrast.c')
-rw-r--r-- | xorg-server/glx/glxdriswrast.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/xorg-server/glx/glxdriswrast.c b/xorg-server/glx/glxdriswrast.c index 26936c3dd..434653e70 100644 --- a/xorg-server/glx/glxdriswrast.c +++ b/xorg-server/glx/glxdriswrast.c @@ -334,6 +334,13 @@ __glXDRIscreenCreateDrawable(ClientPtr client, (*driScreen->swrast->createNewDrawable)(driScreen->driScreen, config->driConfig, private); + if (!private->driDrawable) + { + FreeGC(private->gc, (GContext)0); + FreeGC(private->swapgc, (GContext)0); + free(private); + return NULL; + } return &private->base; } |