summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--wiitrack.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/wiitrack.c b/wiitrack.c
index 7d5889b..13699eb 100644
--- a/wiitrack.c
+++ b/wiitrack.c
@@ -541,8 +541,10 @@ static Bool WTDebugToggleMouse (CompDisplay *d, CompAction *action,
Window xid;
xid = getIntOptionNamed (option, nOption, "root", 0);
s = findScreenAtDisplay (d, xid);
- WIITRACK_SCREEN (s);
- wts->trackMouse = !wts->trackMouse;
+ if (s) {
+ WIITRACK_SCREEN (s);
+ wts->trackMouse = !wts->trackMouse;
+ }
}
return TRUE;
}