ecore: Add _SAFE when iterating the animators.

In some cases (like JS libuv events) an animator callback can trigger the
deletion of an animator, changing the list being iterated.
This commit is contained in:
Lauro Moura 2016-08-12 19:53:07 -03:00 committed by Felipe Magno de Almeida
parent 620454e43d
commit 6aa4486209
1 changed files with 2 additions and 1 deletions

View File

@ -271,13 +271,14 @@ static Eina_Bool
_do_tick(void)
{
Ecore_Animator *animator;
Eina_Inlist *tmp;
EINA_INLIST_FOREACH(animators, animator)
{
animator->just_added = EINA_FALSE;
}
if (animators) eina_evlog("!FRAME", NULL, ecore_loop_time_get(), NULL);
EINA_INLIST_FOREACH(animators, animator)
EINA_INLIST_FOREACH_SAFE(animators, tmp, animator)
{
if ((!animator->delete_me) &&
(!animator->suspended) &&