From 1d65429a9e03871969552d0c31b022546cc46b12 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Thu, 2 Nov 2006 04:12:55 +0200 Subject: [PATCH] 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. --- hw/xfree86/common/xf86Events.c | 15 ++++++++++----- 1 file 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 */