summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter@cs.unisa.edu.au>2007-02-23 12:06:51 +1030
committerPeter Hutterer <whot@hyena.localdomain>2007-02-23 12:06:51 +1030
commitbc4ae25433e38a25a2012f9f233d500665172a4b (patch)
tree64d09995af33d8d1362443e2c8f497bab353e47d
parent4b8b0e377a27ec904b2028c89aed11c6416af26c (diff)
xfree86: Don't initialize sprites for devices that don't own a sprite (stops
keyboard hotplug segfaults)
-rw-r--r--hw/xfree86/common/xf86Xinput.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
index c2ea10825..608fa9bb2 100644
--- a/hw/xfree86/common/xf86Xinput.c
+++ b/hw/xfree86/common/xf86Xinput.c
@@ -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;