forked from enlightenment/efl
elm_ctxpopup: prevent a giant load of errors
Summary: i) There have been 2 sorts of errors, first the items have been deleted after the list was deleted, thus the list items have already been destructed. which lead to the error as the popup items destroyed the list items on destruction as well. ii) sd->box was attached to the ctxpopup when getting into group_del the box has already been destroyed by the cleanup logic. Subscribers: cedric, zmike Tags: #efl Differential Revision: https://phab.enlightenment.org/D6166 Reviewed-by: Cedric BAIL <cedric@osg.samsung.com>
This commit is contained in:
parent
ea1760380e
commit
0090384ef5
|
@ -1103,18 +1103,17 @@ _elm_ctxpopup_efl_canvas_group_group_del(Eo *obj, Elm_Ctxpopup_Data *sd)
|
||||||
{
|
{
|
||||||
Elm_Object_Item *it;
|
Elm_Object_Item *it;
|
||||||
|
|
||||||
evas_object_event_callback_del_full
|
|
||||||
(sd->box, EVAS_CALLBACK_RESIZE, _on_content_resized, obj);
|
|
||||||
evas_object_event_callback_del(sd->content, EVAS_CALLBACK_DEL, _on_content_del);
|
evas_object_event_callback_del(sd->content, EVAS_CALLBACK_DEL, _on_content_del);
|
||||||
_parent_detach(obj);
|
_parent_detach(obj);
|
||||||
|
|
||||||
|
//clear the items before clearing the ctxpopup as this will remove the list and all items
|
||||||
|
EINA_LIST_FREE(sd->items, it)
|
||||||
|
efl_del(it);
|
||||||
|
|
||||||
elm_ctxpopup_clear(obj);
|
elm_ctxpopup_clear(obj);
|
||||||
ELM_SAFE_FREE(sd->arrow, evas_object_del); /* stops _sizing_eval() from going on on deletion */
|
ELM_SAFE_FREE(sd->arrow, evas_object_del); /* stops _sizing_eval() from going on on deletion */
|
||||||
ELM_SAFE_FREE(sd->bg, evas_object_del);
|
ELM_SAFE_FREE(sd->bg, evas_object_del);
|
||||||
|
|
||||||
EINA_LIST_FREE(sd->items, it)
|
|
||||||
efl_del(it);
|
|
||||||
|
|
||||||
efl_canvas_group_del(efl_super(obj, MY_CLASS));
|
efl_canvas_group_del(efl_super(obj, MY_CLASS));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue