summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/xfree86/common/xf86Events.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c
index 4a9f36926..6ce9319c2 100644
--- a/hw/xfree86/common/xf86Events.c
+++ b/hw/xfree86/common/xf86Events.c
@@ -887,7 +887,8 @@ xf86VTSwitch()
*/
pInfo = xf86InputDevs;
while (pInfo) {
- DisableDevice(pInfo->dev);
+ if (pInfo->dev)
+ DisableDevice(pInfo->dev);
pInfo = pInfo->next;
}
#endif /* !__UNIXOS2__ */
@@ -927,8 +928,10 @@ xf86VTSwitch()
#if !defined(__UNIXOS2__)
pInfo = xf86InputDevs;
while (pInfo) {
- xf86ReleaseKeys(pInfo->dev);
- EnableDevice(pInfo->dev);
+ if (pInfo->dev) {
+ xf86ReleaseKeys(pInfo->dev);
+ EnableDevice(pInfo->dev);
+ }
pInfo = pInfo->next;
}
/* XXX HACK */
@@ -991,8 +994,10 @@ xf86VTSwitch()
#if !defined(__UNIXOS2__)
pInfo = xf86InputDevs;
while (pInfo) {
- xf86ReleaseKeys(pInfo->dev);
- EnableDevice(pInfo->dev);
+ if (pInfo->dev) {
+ xf86ReleaseKeys(pInfo->dev);
+ EnableDevice(pInfo->dev);
+ }
pInfo = pInfo->next;
}
/* XXX HACK */