From 738886ebf6f35d2d7347491dcc960a5483d49ae2 Mon Sep 17 00:00:00 2001 From: sachiel Date: Mon, 29 Mar 2010 07:13:35 +0000 Subject: [PATCH] More safety removing stuff from lists git-svn-id: http://svn.enlightenment.org/svn/e/trunk/edje@47554 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/edje_edit.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/edje_edit.c b/src/lib/edje_edit.c index 8ba8d93..fb5c87c 100644 --- a/src/lib/edje_edit.c +++ b/src/lib/edje_edit.c @@ -318,7 +318,7 @@ _edje_part_id_set(Edje *ed, Edje_Real_Part *rp, int new_id) */ int old_id; Edje_Part *part; - Eina_List *l, *ll; + Eina_List *l, *ll, *l_next; Edje_Part *p; Edje_Program *epr; @@ -373,12 +373,12 @@ _edje_part_id_set(Edje *ed, Edje_Real_Part *rp, int new_id) if (epr->action != EDJE_ACTION_TYPE_STATE_SET) continue; - EINA_LIST_FOREACH(epr->targets, ll, pt) + EINA_LIST_FOREACH_SAFE(epr->targets, ll, l_next, pt) { if (pt->id == old_id) { if (new_id == -1) - epr->targets = eina_list_remove(epr->targets, pt); + epr->targets = eina_list_remove_list(epr->targets, ll); else pt->id = new_id; } -- 2.7.4