efl_ui_scroller: remove from the sub_object list on unset

this should fix lifetime issues with Efl.Ui.Scroller

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10920
This commit is contained in:
Marcel Hollerbach 2019-12-19 10:50:25 +01:00 committed by Cedric BAIL
parent 3e7424c86d
commit d1480d7762
1 changed files with 1 additions and 0 deletions

View File

@ -201,6 +201,7 @@ _efl_ui_scroller_efl_content_content_unset(Eo *obj EINA_UNUSED, Efl_Ui_Scroller_
Efl_Gfx_Entity *old_content = pd->content;
efl_content_unset(pd->pan_obj);
efl_ui_widget_sub_object_del(obj, old_content);
efl_event_callback_del(pd->content, EFL_EVENT_INVALIDATE, _efl_ui_scroller_content_del_cb, obj);
pd->content = NULL;
efl_event_callback_call(obj, EFL_CONTENT_EVENT_CONTENT_CHANGED, NULL);