authorPeter Hutterer <>2009-05-11 02:51:40 (GMT)
committer Peter Hutterer <>2009-05-16 02:01:22 (GMT)
commit6f9e22049862ee9ac7f604411d005d8bb1b2dd1c (patch) (side-by-side diff)
parentc1d7deca9281ba1df0df1abcea1fe7f841b10ff9 (diff)
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 <>
Diffstat (more/less context) (ignore whitespace changes)
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;