summaryrefslogtreecommitdiff
path: root/mi/mieq.c
diff options
context:
space:
mode:
authorPierre Willenbrock <pierre@pirsoft.de>2009-07-16 12:12:48 +0200
committerPeter Hutterer <peter.hutterer@who-t.net>2009-07-17 14:40:54 +1000
commit9965174f4f09a7de00a9569607e96226208bc2ce (patch)
tree3ea8b73bdddf0f1d72c3a63de90a4357e064b253 /mi/mieq.c
parentc806162c133603a99d9cd844bb04485bb663707d (diff)
Check dev->u.master if there is a custom event handler, too
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 562580200..f28a16d61 100644
--- a/mi/mieq.c
+++ b/mi/mieq.c
@@ -401,7 +401,9 @@ mieqProcessDeviceEvent(DeviceIntPtr dev,
if (handler)
{
handler(DequeueScreen(dev)->myNum, event, dev);
- if (master)
+ /* Check for the SD's master in case the device got detached
+ * during event processing */
+ if (master && dev->u.master)
handler(DequeueScreen(master)->myNum,
(InternalEvent*)masterEvents->event, master);
} else