Eo: Fixed potential infinite loop with child deletion.

It looks like it should get into a loop for every object that has
children.
This commit is contained in:
Tom Hacohen 2013-11-08 12:10:50 +00:00
parent cdf56cbdae
commit a52751d065
1 changed files with 3 additions and 2 deletions

View File

@ -891,11 +891,12 @@ static void
_destructor(Eo *obj, void *class_data, va_list *list EINA_UNUSED)
{
Private_Data *pd = class_data;
Eo *child;
DBG("%p - %s.", obj, eo_class_name_get(MY_CLASS));
while (pd->children)
eo_do(eina_list_data_get(pd->children), eo_parent_set(NULL));
EINA_LIST_FREE(pd->children, child)
eo_do(child, eo_parent_set(NULL));
_eo_generic_data_del_all(class_data);
_wref_destruct(class_data);