diff options
Diffstat (limited to 'xorg-server/dix/devices.c')
-rw-r--r-- | xorg-server/dix/devices.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/xorg-server/dix/devices.c b/xorg-server/dix/devices.c index 106d2dfc7..468b5a199 100644 --- a/xorg-server/dix/devices.c +++ b/xorg-server/dix/devices.c @@ -947,8 +947,9 @@ CloseDevice(DeviceIntPtr dev) if (dev->inited) (void) (*dev->deviceProc) (dev, DEVICE_CLOSE); - /* free sprite memory */ - if (IsMaster(dev) && dev->spriteInfo->sprite) + FreeSprite(dev); + + if (IsMaster(dev)) screen->DeviceCursorCleanup(dev, screen); /* free acceleration info */ @@ -969,8 +970,6 @@ CloseDevice(DeviceIntPtr dev) free(classes); } - FreeSprite(dev); - /* a client may have the device set as client pointer */ for (j = 0; j < currentMaxClients; j++) { if (clients[j] && clients[j]->clientPtr == dev) { |