From 7d1463124ac139f3cb99028ff453041a5453ef8f Mon Sep 17 00:00:00 2001 From: Marcel Hollerbach Date: Mon, 9 Dec 2019 21:51:02 +0100 Subject: [PATCH] efl_ui_widget: do not execute up handler when on destruction otherwise we would cause an error. Reviewed-by: Cedric BAIL Differential Revision: https://phab.enlightenment.org/D10846 --- src/lib/elementary/efl_ui_widget.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib/elementary/efl_ui_widget.c b/src/lib/elementary/efl_ui_widget.c index 010c9fa9b6..768d934fae 100644 --- a/src/lib/elementary/efl_ui_widget.c +++ b/src/lib/elementary/efl_ui_widget.c @@ -691,7 +691,8 @@ _obj_mouse_up(void *data, Evas_Event_Mouse_Up *ev = event_info; if (sd->still_in && (ev->flags == EVAS_BUTTON_NONE) && - (sd->focus_move_policy == ELM_FOCUS_MOVE_POLICY_CLICK)) + (sd->focus_move_policy == ELM_FOCUS_MOVE_POLICY_CLICK) && + !efl_invalidated_get(data)) elm_widget_focus_mouse_up_handle(evas_object_widget_parent_find(obj)); sd->still_in = EINA_FALSE; @@ -704,7 +705,8 @@ _obj_mouse_in(void *data, void *event_info EINA_UNUSED) { ELM_WIDGET_DATA_GET(data, sd); - if (sd->focus_move_policy == ELM_FOCUS_MOVE_POLICY_IN) + if (sd->focus_move_policy == ELM_FOCUS_MOVE_POLICY_IN && + !efl_invalidated_get(data)) elm_widget_focus_mouse_up_handle(evas_object_widget_parent_find(obj)); }