https://bugs.freedesktop.org/show_bug.cgi?id=89296

Signed-off-by: Olivier Fourdan <[email protected]>
---

 v2: Move the test to LibinputSetProperty() and do it only once

 src/libinput.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/libinput.c b/src/libinput.c
index 9613fbd..ac14adb 100644
--- a/src/libinput.c
+++ b/src/libinput.c
@@ -1550,8 +1550,14 @@ static int
 LibinputSetProperty(DeviceIntPtr dev, Atom atom, XIPropertyValuePtr val,
                  BOOL checkonly)
 {
+       InputInfoPtr pInfo = dev->public.devicePrivate;
+       struct xf86libinput *driver_data = pInfo->private;
+       struct libinput_device *device = driver_data->device;
        int rc;
 
+       if (device == NULL)
+               return XI_BadDevice;
+
        if (atom == prop_tap)
                rc = LibinputSetPropertyTap(dev, atom, val, checkonly);
        else if (atom == prop_calibration)
-- 
2.1.0

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to