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>2014-08-29 13:32:50 +0100
commit1c34e774eff6c5a22501833444a10440cf3f915a (patch)
tree2d617ce6c42217804dee53a9939202b4aa2bded2
parent16d9da08861fe504de4be8c31708592e30687156 (diff)
hw/xwin: Fix a potential crash in winRedrawScreenShadowDDNL()
Seen during shutdown when using '-fullscreen' and '-depth 8' Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
-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 55af5c383..cb326dc81 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;