summaryrefslogtreecommitdiff
authorPeter Hutterer <peter.hutterer@who-t.net>2009-05-11 02:51:40 (GMT)
committer Peter Hutterer <peter.hutterer@who-t.net>2009-05-16 02:01:22 (GMT)
commit6f9e22049862ee9ac7f604411d005d8bb1b2dd1c (patch) (side-by-side diff)
treeea469a88cb84dd4eb1acb0ab5cb4e0a0dcca7946
parentc1d7deca9281ba1df0df1abcea1fe7f841b10ff9 (diff)
downloadxserver-6f9e22049862ee9ac7f604411d005d8bb1b2dd1c.zip
xserver-6f9e22049862ee9ac7f604411d005d8bb1b2dd1c.tar.gz
dix: ensure Activate/DeactivateGrab has a valid value.
Xephyr doesn't manually set Activate/DeactivateGrab for new devices, resulting in a NULL-pointer dereference later when a grab is activated. Avoid the segfault by ensuring that the pointer is always valid. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--dix/devices.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/dix/devices.c b/dix/devices.c
index afe340b..6f464e7 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -224,6 +224,8 @@ AddInputDevice(ClientPtr client, DeviceProc deviceProc, Bool autoStart)
/* device grab defaults */
dev->deviceGrab.grabTime = currentTime;
+ dev->deviceGrab.ActivateGrab = ActivateKeyboardGrab;
+ dev->deviceGrab.DeactivateGrab = DeactivateKeyboardGrab;
dev->coreEvents = TRUE;