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>
This commit is contained in:
Jon TURNEY 2013-11-11 15:09:18 +00:00
parent 16d9da0886
commit 1c34e774ef

View File

@ -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;