summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2006-11-02 04:12:55 +0200
committerDaniel Stone <daniels@endtroducing.fooishbar.org>2006-11-02 04:12:55 +0200
commit1d65429a9e03871969552d0c31b022546cc46b12 (patch)
treecd5e4a87add2c7f8065b1c13cce4b18d1ed1c25b
parent64139c1950ea825c0a0124abc5f88499e91f797f (diff)
xfree86: don't attempt to enable and disable non-DIX devices
Don't try to enable and disable devices with no entry in the DIX, such as the evdev brain.
-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 */