libinput: Don't process touch events for devices without a valid output
authorAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Thu, 24 Apr 2014 12:11:14 +0000 (15:11 +0300)
committerKristian Høgsberg <krh@bitplanet.net>
Fri, 25 Apr 2014 21:55:08 +0000 (14:55 -0700)
That would be the case of a touch screen mapped to an output that was
unplugged.

src/libinput-device.c

index 0ca6c4b..a67c119 100644 (file)
@@ -147,6 +147,9 @@ handle_touch_with_coords(struct libinput_device *libinput_device,
        uint32_t time;
        int32_t slot;
 
+       if (!device->output)
+               return;
+
        time = libinput_event_touch_get_time(touch_event);
        slot = libinput_event_touch_get_seat_slot(touch_event);