summaryrefslogtreecommitdiff
path: root/hw/xwin/winshadgdi.c
diff options
context:
space:
mode:
authorJon TURNEY <jon.turney@dronecode.org.uk>2011-03-05 17:34:42 +0000
committerJon TURNEY <jon.turney@dronecode.org.uk>2011-04-27 14:25:16 +0100
commit4318e6a147e78b2663c5e0ea6ba0d351a1e87f98 (patch)
tree22a66beaddf5d5ac4943135ab3a03303ee96b8ab /hw/xwin/winshadgdi.c
parentce6136f8c553bbc6d3e3affa0faa2afbf8054f44 (diff)
Cygwin/X: Handle failure during winScreenInit()
Handle failure during winScreenInit() a bit more cleanly, rather than crashing This avoids a crash with 'XWin -fullscreen -screen 0 @2 -screen 1 @1' Also document that fullscreen may only be applied to one screen. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> Tested-by: Colin Harrison <colin.harrison@virgin.net>
Diffstat (limited to 'hw/xwin/winshadgdi.c')
-rw-r--r--hw/xwin/winshadgdi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/xwin/winshadgdi.c b/hw/xwin/winshadgdi.c
index 499037656..1e7cb006c 100644
--- a/hw/xwin/winshadgdi.c
+++ b/hw/xwin/winshadgdi.c
@@ -636,7 +636,8 @@ winCloseScreenShadowGDI (int nIndex, ScreenPtr pScreen)
/* Call the wrapped CloseScreen procedure */
WIN_UNWRAP(CloseScreen);
- fReturn = (*pScreen->CloseScreen) (nIndex, pScreen);
+ if (pScreen->CloseScreen)
+ fReturn = (*pScreen->CloseScreen) (nIndex, pScreen);
/* Delete the window property */
RemoveProp (pScreenPriv->hwndScreen, WIN_SCR_PROP);