xfree86: Don't initialize sprites for devices that don't own a sprite (stops

keyboard hotplug segfaults)
This commit is contained in:
Peter Hutterer 2007-02-23 12:06:51 +10:30 committed by Peter Hutterer
parent 4b8b0e377a
commit bc4ae25433

View File

@ -421,7 +421,8 @@ NewInputDeviceRequest (InputOption *options)
EnableDevice(dev);
/* send enter/leave event, update sprite window */
InitializeSprite(dev, GetCurrentRootWindow());
if (dev->spriteOwner)
InitializeSprite(dev, GetCurrentRootWindow());
CheckMotion(NULL, dev);
return Success;