summaryrefslogtreecommitdiff
path: root/src/lib/ecore_wl2/ecore_wl2_input.c
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2017-06-02 18:23:44 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2017-06-02 18:23:42 -0400
commitd61453be22e0a1c65dd353f86a9407ad182d9676 (patch)
tree66658eee4cd2c05fb9e0dc6b9623935a0d737f69 /src/lib/ecore_wl2/ecore_wl2_input.c
parenta7ed5d05403f1bd1a36ae86544504c19311cb577 (diff)
ecore-wl2: do not unref non-matching input device upon removal
this is how you avoid crashing @fix
Diffstat (limited to 'src/lib/ecore_wl2/ecore_wl2_input.c')
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_input.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/ecore_wl2/ecore_wl2_input.c b/src/lib/ecore_wl2/ecore_wl2_input.c
index 510139006b..693a3ad3ea 100644
--- a/src/lib/ecore_wl2/ecore_wl2_input.c
+++ b/src/lib/ecore_wl2/ecore_wl2_input.c
@@ -1543,17 +1543,17 @@ _ecore_evas_wl_common_cb_device_event(void *data, int type, void *event)
1543 return ECORE_CALLBACK_PASS_ON; 1543 return ECORE_CALLBACK_PASS_ON;
1544 } 1544 }
1545 1545
1546 if (ev->type == ECORE_WL2_DEVICE_TYPE_POINTER && devices->pointer_dev) 1546 if ((ev->type == ECORE_WL2_DEVICE_TYPE_POINTER) && (devices->pointer_dev == ev->dev))
1547 { 1547 {
1548 efl_unref(devices->pointer_dev); 1548 efl_unref(devices->pointer_dev);
1549 devices->pointer_dev = NULL; 1549 devices->pointer_dev = NULL;
1550 } 1550 }
1551 else if (ev->type == ECORE_WL2_DEVICE_TYPE_KEYBOARD && devices->keyboard_dev) 1551 else if ((ev->type == ECORE_WL2_DEVICE_TYPE_KEYBOARD) && (devices->keyboard_dev == ev->dev))
1552 { 1552 {
1553 efl_unref(devices->keyboard_dev); 1553 efl_unref(devices->keyboard_dev);
1554 devices->keyboard_dev = NULL; 1554 devices->keyboard_dev = NULL;
1555 } 1555 }
1556 else if (ev->type == ECORE_WL2_DEVICE_TYPE_TOUCH && devices->touch_dev) 1556 else if ((ev->type == ECORE_WL2_DEVICE_TYPE_TOUCH) && (devices->touch_dev == ev->dev))
1557 { 1557 {
1558 efl_unref(devices->touch_dev); 1558 efl_unref(devices->touch_dev);
1559 devices->touch_dev = NULL; 1559 devices->touch_dev = NULL;