someone change... bdilly 72499. bad! iterators are not safe for

deletions of hashes if u iterate over what u are deleting!



SVN revision: 73335
This commit is contained in:
Carsten Haitzler 2012-07-05 09:36:07 +00:00
parent c417a9c99f
commit 0e2924f6a7
1 changed files with 6 additions and 3 deletions

View File

@ -47,12 +47,15 @@ _elm_module_shutdown(void)
if (modules)
{
Eina_List *tl = NULL;
it = eina_hash_iterator_data_new(modules);
EINA_ITERATOR_FOREACH(it, m)
_elm_module_del(m);
EINA_ITERATOR_FOREACH(it, m) tl = eina_list_append(tl, m);
eina_iterator_free(it);
EINA_LIST_FREE(tl, m) _elm_module_del(m);
eina_hash_free(modules);
modules = NULL;
}