summaryrefslogtreecommitdiff
path: root/mi/mieq.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2009-06-03 12:30:49 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-06-03 14:38:55 +1000
commitaf4e658401ecbd2f2cc515b4c5abe5aee361cd64 (patch)
tree1c012204704015cd42507ad68bea62393089f4d8 /mi/mieq.c
parenteb3fe72cbcd10c3953d713e07c321e695194a328 (diff)
mi: only process master if the SD is still attached.
SDs may be detached during event processing (e.g. if a passive grab activates). In this case, the event must not be processed through the master device. Reported-by: Thomas Jaeger Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'mi/mieq.c')
-rw-r--r--mi/mieq.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/mi/mieq.c b/mi/mieq.c
index 7ba755c29..8ceda4357 100644
--- a/mi/mieq.c
+++ b/mi/mieq.c
@@ -402,7 +402,9 @@ mieqProcessDeviceEvent(DeviceIntPtr dev,
/* process slave first, then master */
dev->public.processInputProc(event, dev);
- if (master)
+ /* Check for the SD's master in case the device got detached
+ * during event processing */
+ if (master && dev->u.master)
master->public.processInputProc(
(InternalEvent*)masterEvents->event,
master);