aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xwin
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/xwin')
-rw-r--r--xorg-server/hw/xwin/winshaddd.c4
-rw-r--r--xorg-server/hw/xwin/winshadddnl.c4
2 files changed, 8 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;
diff --git a/xorg-server/hw/xwin/winshadddnl.c b/xorg-server/hw/xwin/winshadddnl.c
index 008956e91..59a0b655e 100644
--- a/xorg-server/hw/xwin/winshadddnl.c
+++ b/xorg-server/hw/xwin/winshadddnl.c
@@ -689,6 +689,10 @@ winShadowUpdateDDNL (ScreenPtr pScreen,
if ((!pScreenPriv->fActive && pScreenInfo->fFullScreen)
|| pScreenPriv->fBadDepth) return;
+ /* 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;