dix: reset potential lastSlaves when disabling an SD

Unplug a mouse, then warp the pointer and the warp pointer code will try
to update the position of the last slave device associated with the
master. That pointer will be stale and the X server will crash.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Keith Packard 2008-07-21 11:48:24 -07:00 committed by Peter Hutterer
parent 8c8c4fdf34
commit 67d7821ae7

View File

@ -358,6 +358,14 @@ DisableDevice(DeviceIntPtr dev)
AttachDevice(NULL, other, NULL);
}
}
else
{
for (other = inputInfo.devices; other; other = other->next)
{
if (other->isMaster && other->u.lastSlave == dev)
other->u.lastSlave = NULL;
}
}
if (dev->isMaster && dev->spriteInfo->sprite)
{