From af4e658401ecbd2f2cc515b4c5abe5aee361cd64 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 3 Jun 2009 12:30:49 +1000 Subject: [PATCH] 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 --- mi/mieq.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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);