aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-01-29 12:46:17 -0500
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-01-30 13:32:04 +0100
commitb8617843f75ddd4415630024a61d874f2b208084 (patch)
tree657f40d4984c7a528d4a2d426e8ffc9bfc74dc06
parenttests: move efl_ui focus tests into efl_ui_suite (diff)
downloadefl-b8617843f75ddd4415630024a61d874f2b208084.tar.gz
efl_ui_scroll_manager: avoid some safety check errors on deletion
only remove callbacks if pan_obj is still alive Differential Revision: https://phab.enlightenment.org/D7822
-rw-r--r--src/lib/elementary/efl_ui_scroll_manager.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/lib/elementary/efl_ui_scroll_manager.c b/src/lib/elementary/efl_ui_scroll_manager.c
index ee10d895ab..d88e0d4b15 100644
--- a/src/lib/elementary/efl_ui_scroll_manager.c
+++ b/src/lib/elementary/efl_ui_scroll_manager.c
@@ -2433,17 +2433,19 @@ _efl_ui_scroll_manager_efl_object_destructor(Eo *obj, Efl_Ui_Scroll_Manager_Data
ELM_ANIMATOR_DISCONNECT(sd->event_rect, sd->scrollto.x.animator, _efl_ui_scroll_manager_scroll_to_x_animator, sd);
ELM_ANIMATOR_DISCONNECT(sd->event_rect, sd->scrollto.y.animator, _efl_ui_scroll_manager_scroll_to_y_animator, sd);
- evas_object_event_callback_del_full(sd->pan_obj, EVAS_CALLBACK_RESIZE,
- _efl_ui_scroll_manager_pan_resized_cb, obj);
- evas_object_event_callback_del_full(sd->pan_obj, EVAS_CALLBACK_MOVE,
- _efl_ui_scroll_manager_pan_moved_cb, obj);
- efl_event_callback_del
- (sd->pan_obj, EFL_UI_PAN_EVENT_CONTENT_CHANGED, _efl_ui_scroll_manager_pan_content_changed_cb, sd);
- efl_event_callback_del
- (sd->pan_obj, EFL_UI_PAN_EVENT_VIEWPORT_CHANGED, _efl_ui_scroll_manager_pan_viewport_changed_cb, sd);
- efl_event_callback_del
- (sd->pan_obj, EFL_UI_PAN_EVENT_POSITION_CHANGED, _efl_ui_scroll_manager_pan_position_changed_cb, sd);
-
+ if (!efl_invalidating_get(sd->pan_obj))
+ {
+ evas_object_event_callback_del_full(sd->pan_obj, EVAS_CALLBACK_RESIZE,
+ _efl_ui_scroll_manager_pan_resized_cb, obj);
+ evas_object_event_callback_del_full(sd->pan_obj, EVAS_CALLBACK_MOVE,
+ _efl_ui_scroll_manager_pan_moved_cb, obj);
+ efl_event_callback_del
+ (sd->pan_obj, EFL_UI_PAN_EVENT_CONTENT_CHANGED, _efl_ui_scroll_manager_pan_content_changed_cb, sd);
+ efl_event_callback_del
+ (sd->pan_obj, EFL_UI_PAN_EVENT_VIEWPORT_CHANGED, _efl_ui_scroll_manager_pan_viewport_changed_cb, sd);
+ efl_event_callback_del
+ (sd->pan_obj, EFL_UI_PAN_EVENT_POSITION_CHANGED, _efl_ui_scroll_manager_pan_position_changed_cb, sd);
+ }
efl_destructor(efl_super(obj, MY_CLASS));
}