eo: Fix composite objects destruction

This walks the list and removes objects from it. Not
using EINA_LIST_FREE as the actual list_remove is done
inside eo_composite_detach.
This commit is contained in:
Jean-Philippe Andre 2016-06-28 19:29:31 +09:00
parent 2078b74e28
commit d8db7b2637
1 changed files with 2 additions and 2 deletions

View File

@ -1439,9 +1439,9 @@ _eo_base_destructor(Eo *obj, Eo_Base_Data *pd)
/* If we are a composite object, detach children */ /* If we are a composite object, detach children */
{ {
EO_OBJ_POINTER_RETURN(obj, obj_data); EO_OBJ_POINTER_RETURN(obj, obj_data);
Eina_List *itr; Eina_List *itr, *next;
Eo *emb_obj_id; Eo *emb_obj_id;
EINA_LIST_FOREACH(obj_data->composite_objects, itr, emb_obj_id) EINA_LIST_FOREACH_SAFE(obj_data->composite_objects, itr, next, emb_obj_id)
{ {
eo_composite_detach(obj, emb_obj_id); eo_composite_detach(obj, emb_obj_id);
} }