Commit 88c767ed authored by Michal Suchánek's avatar Michal Suchánek Committed by Peter Hutterer
Browse files

Fix crash for motion events from devices without valuators

A WarpPointer request may trigger a motion event on a device without
valuators. That request is ignored by GetPointerEvents but during smooth
scroll emulation we dereference dev->valuators to get the number of axes.

Break out early if the device doesn't have valuators.
Signed-off-by: Michal Suchánek's avatarMichal Suchanek <>
Reviewed-by: Peter Hutterer's avatarPeter Hutterer <>
Signed-off-by: Peter Hutterer's avatarPeter Hutterer <>
parent 594b4a4f
......@@ -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))
if (!valuator_mask_isset(&mask, i))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment