aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/dix/getevents.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/dix/getevents.c')
-rw-r--r--xorg-server/dix/getevents.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xorg-server/dix/getevents.c b/xorg-server/dix/getevents.c
index ae4112ffc..4fbaa6c94 100644
--- a/xorg-server/dix/getevents.c
+++ b/xorg-server/dix/getevents.c
@@ -1615,7 +1615,7 @@ GetPointerEvents(InternalEvent *events, DeviceIntPtr pDev, int type,
/* Now turn the smooth-scrolling axes back into emulated button presses
* for legacy clients, based on the integer delta between before and now */
for (i = 0; i < valuator_mask_size(&mask); i++) {
- if (i >= pDev->valuator->numAxes)
+ if ( !pDev->valuator || (i >= pDev->valuator->numAxes))
break;
if (!valuator_mask_isset(&mask, i))