summaryrefslogtreecommitdiff
path: root/composite
diff options
context:
space:
mode:
Diffstat (limited to 'composite')
-rw-r--r--composite/compwindow.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/composite/compwindow.c b/composite/compwindow.c
index 367f23eb7..f88238146 100644
--- a/composite/compwindow.c
+++ b/composite/compwindow.c
@@ -326,7 +326,7 @@ compIsAlternateVisual(ScreenPtr pScreen, XID visual)
CompScreenPtr cs = GetCompScreen(pScreen);
int i;
- for (i = 0; i < cs->numAlternateVisuals; i++)
+ for (i = 0; cs && i < cs->numAlternateVisuals; i++)
if (cs->alternateVisuals[i] == visual)
return TRUE;
return FALSE;