diff options
author | Peter Hutterer <peter@cs.unisa.edu.au> | 2007-11-08 15:44:18 +1030 |
---|---|---|
committer | Peter Hutterer <peter@cs.unisa.edu.au> | 2007-11-08 15:44:18 +1030 |
commit | 59b304d8a24fecd094296feb217823f0c73d6f82 (patch) | |
tree | 2e2f1158a34ba4e34f61bf31b80e73fc75f31caf /mi/mipointer.c | |
parent | 3063f0c6679bdbea13f360cff8d09a88b9871da9 (diff) |
dix, mi: stop segfaults when a floating device emits events.
For pointers: don't try to set master->valuator fields if there is no master.
For keyboards: check if device is valid before trying to access the fields in
miPointerGetScreen (btw. this disables DGA events for floating keyboards).
Also stop the hideous number of ErrorFs if we request the paired device for a
floating dev.
Diffstat (limited to 'mi/mipointer.c')
-rw-r--r-- | mi/mipointer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mi/mipointer.c b/mi/mipointer.c index 7b565799e..b2f31c1d5 100644 --- a/mi/mipointer.c +++ b/mi/mipointer.c @@ -529,7 +529,7 @@ miPointerCurrentScreen () _X_EXPORT ScreenPtr miPointerGetScreen(DeviceIntPtr pDev) { - if (!pDev->isMaster && !pDev->u.master) + if (!pDev || (!pDev->isMaster && !pDev->u.master)) return NULL; return MIPOINTER(pDev)->pScreen; |