aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xwin/winshaddd.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/xwin/winshaddd.c')
-rw-r--r--xorg-server/hw/xwin/winshaddd.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/xorg-server/hw/xwin/winshaddd.c b/xorg-server/hw/xwin/winshaddd.c
index 4644a8493..8d4cfdc63 100644
--- a/xorg-server/hw/xwin/winshaddd.c
+++ b/xorg-server/hw/xwin/winshaddd.c
@@ -499,6 +499,10 @@ winShadowUpdateDD (ScreenPtr pScreen,
if ((!pScreenPriv->fActive && pScreenInfo->fFullScreen)
|| pScreenPriv->fBadDepth) return;
+ /* Return immediately if we didn't get needed surfaces */
+ if (!pScreenPriv->pddsPrimary || !pScreenPriv->pddsShadow)
+ return;
+
/* Get the origin of the window in the screen coords */
ptOrigin.x = pScreenInfo->dwXOffset;
ptOrigin.y = pScreenInfo->dwYOffset;