summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon TURNEY <jon.turney@dronecode.org.uk>2013-11-11 15:09:18 +0000
committerJon TURNEY <jon.turney@dronecode.org.uk>2013-11-11 15:10:47 +0000
commitf1e68c2c6a18c251be02cc0ecbabb265c7610b55 (patch)
treec78fd5236958d68fac7b5ff78d4e2b8c77f78e8a
parent08745546d7ae48e3b740e88f1924bf6fc3e3b453 (diff)
Fix a potential crash in winRedrawScreenShadowDDNL()
Seen during shutdown when using '-depth 8'
-rw-r--r--hw/xwin/winshadddnl.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/xwin/winshadddnl.c b/hw/xwin/winshadddnl.c
index 01097f295..9fc3a15ea 100644
--- a/hw/xwin/winshadddnl.c
+++ b/hw/xwin/winshadddnl.c
@@ -986,6 +986,10 @@ winRedrawScreenShadowDDNL(ScreenPtr pScreen)
RECT rcSrc, rcDest;
POINT ptOrigin;
+ /* Return immediately if we didn't get needed surfaces */
+ if (!pScreenPriv->pddsPrimary4 || !pScreenPriv->pddsShadow4)
+ return;
+
/* Get the origin of the window in the screen coords */
ptOrigin.x = pScreenInfo->dwXOffset;
ptOrigin.y = pScreenInfo->dwYOffset;