forked from enlightenment/enlightenment
fix infintie delfn loop waiting to happen.
SVN revision: 80048
This commit is contained in:
parent
a4af3e5f6d
commit
d268bb2cc3
|
@ -314,19 +314,24 @@ e_object_del_attach_func_set(E_Object *obj, E_Object_Cleanup_Func func)
|
||||||
EAPI void
|
EAPI void
|
||||||
e_object_delfn_clear(E_Object *obj)
|
e_object_delfn_clear(E_Object *obj)
|
||||||
{
|
{
|
||||||
|
E_Object_Delfn *dfn;
|
||||||
|
|
||||||
E_OBJECT_CHECK(obj);
|
E_OBJECT_CHECK(obj);
|
||||||
|
if (obj->walking_list)
|
||||||
|
{
|
||||||
|
EINA_INLIST_FOREACH(obj->del_fn_list, dfn)
|
||||||
|
{
|
||||||
|
dfn->delete_me = 1;
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
while (obj->del_fn_list)
|
while (obj->del_fn_list)
|
||||||
{
|
{
|
||||||
E_Object_Delfn *dfn = (E_Object_Delfn *)obj->del_fn_list;
|
dfn = (E_Object_Delfn *)obj->del_fn_list;
|
||||||
if (obj->walking_list)
|
|
||||||
dfn->delete_me = 1;
|
|
||||||
else
|
|
||||||
{
|
|
||||||
obj->del_fn_list = eina_inlist_remove(obj->del_fn_list,
|
obj->del_fn_list = eina_inlist_remove(obj->del_fn_list,
|
||||||
EINA_INLIST_GET(dfn));
|
EINA_INLIST_GET(dfn));
|
||||||
free(dfn);
|
free(dfn);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI E_Object_Delfn *
|
EAPI E_Object_Delfn *
|
||||||
|
|
Loading…
Reference in New Issue