rimmed pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=eb5124a99df288c539c34a25b0f24bcff8e60639

commit eb5124a99df288c539c34a25b0f24bcff8e60639
Author: Vitalii Vorobiov <vi.vorob...@samsung.com>
Date:   Mon Sep 26 21:00:04 2016 +0300

    resource_manager: on group's alias del use EINA_LIST_FOREACH_SAFE
    
    because deleted aliases getting removed from eina_list
    
    @fix
---
 src/bin/resource_manager/resource_manager_free.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/bin/resource_manager/resource_manager_free.c 
b/src/bin/resource_manager/resource_manager_free.c
index f6e2081..5325c90 100644
--- a/src/bin/resource_manager/resource_manager_free.c
+++ b/src/bin/resource_manager/resource_manager_free.c
@@ -724,7 +724,7 @@ TODO("Apply more complex work (with warning and error 
maybe?)"
 void
 _resource_group_del(Project *pro, Group2 *group)
 {
-   Eina_List *l;
+   Eina_List *l, *l_next;
    Resource2 *res;
    Program2 *program;
    Part2 *part;
@@ -734,19 +734,19 @@ _resource_group_del(Project *pro, Group2 *group)
 
    Eina_Bool is_opened = false;
 
-   /* If this group is alias, then delete it from aliased */
-   if (group->main_group)
-     group->main_group->aliases = eina_list_remove(group->main_group->aliases, 
group);
-
    /* IMPORTANT
       Since edje edit together with group deletion also delete all it's aliases
       it's important to update dependencies and recursively remove deps for
       every aliased group. */
-   EINA_LIST_FOREACH(group->aliases, l, alias_group)
+   EINA_LIST_FOREACH_SAFE(group->aliases, l, l_next, alias_group)
      {
         CRIT_ON_FAIL(editor_group_del(ap.project->global_object, 
alias_group->common.name, true));
      }
 
+   /* If this group is alias, then delete it from aliased */
+   if (group->main_group)
+     group->main_group->aliases = eina_list_remove(group->main_group->aliases, 
group);
+
    EINA_LIST_FOREACH(group->common.used_in, l, res)
      {
         if (res->common.type == RESOURCE2_TYPE_PART)

-- 


Reply via email to