elput: unref devices in post event cb
authorMike Blumenkrantz <zmike@osg.samsung.com>
Fri, 28 Jul 2017 19:44:43 +0000 (15:44 -0400)
committerMike Blumenkrantz <zmike@osg.samsung.com>
Fri, 28 Jul 2017 19:40:47 +0000 (15:40 -0400)
@fix

src/lib/elput/elput_input.c

index 4210aed..9024611 100644 (file)
@@ -166,6 +166,7 @@ _device_event_cb_free(void *data EINA_UNUSED, void *event)
 
    ev = event;
 
+   ev->device->refs--;
    if (ev->type == ELPUT_DEVICE_REMOVED)
      {
         Elput_Seat *seat;
@@ -174,7 +175,6 @@ _device_event_cb_free(void *data EINA_UNUSED, void *event)
         if (seat)
           seat->devices = eina_list_remove(seat->devices, ev->device);
 
-        ev->device->refs--;
         _evdev_device_destroy(ev->device);
      }