xf86PostMotionEvents[P] calls xf86SendDragEvents, xf86SendDragEvents

unconditionally checks device->button->buttonsDown.

Let's make it possible to have a device with motion, but no buttons.

Without segfaulting.
This commit is contained in:
Zephaniah E. Hull 2007-06-04 09:09:20 -04:00
parent fbb9b20395
commit 75dece08fb

View File

@ -101,7 +101,7 @@ xf86SendDragEvents(DeviceIntPtr device)
{
LocalDevicePtr local = (LocalDevicePtr) device->public.devicePrivate;
if (device->button->buttonsDown > 0)
if (device->button && device->button->buttonsDown > 0)
return (local->flags & XI86_SEND_DRAG_EVENTS);
else
return (TRUE);