From 49dbe9a757a3d7a0b9ab318242c6cc0cbd4dd1f0 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 6 Sep 2007 17:27:28 +0930 Subject: [PATCH] dix: close virtual core devices after other devices. If a device is paired with the VCP, deleting the VCP before the device will segfault the server when the sprite should get updated. --- dix/devices.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dix/devices.c b/dix/devices.c index fbb6cba66..e60601636 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -712,9 +712,6 @@ CloseDownDevices(void) { DeviceIntPtr dev, next; - CloseDevice(inputInfo.keyboard); - CloseDevice(inputInfo.pointer); - for (dev = inputInfo.devices; dev; dev = next) { next = dev->next; @@ -725,6 +722,10 @@ CloseDownDevices(void) next = dev->next; CloseDevice(dev); } + + CloseDevice(inputInfo.keyboard); + CloseDevice(inputInfo.pointer); + inputInfo.devices = NULL; inputInfo.off_devices = NULL; inputInfo.keyboard = NULL;