From baebda504f17272c12d9e66dd8b744722fe2deb6 Mon Sep 17 00:00:00 2001 From: cedric Date: Thu, 15 Dec 2011 10:02:39 +0000 Subject: [PATCH] edje: use EINA_LIST_FOREACH_SAFE when removing item from a list. Bug spotted by Michael Bouchaud. git-svn-id: http://svn.enlightenment.org/svn/e/trunk/edje@66250 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/bin/edje_cc_out.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bin/edje_cc_out.c b/src/bin/edje_cc_out.c index 75104fe..db3cce5 100644 --- a/src/bin/edje_cc_out.c +++ b/src/bin/edje_cc_out.c @@ -1536,10 +1536,10 @@ data_queue_copied_program_lookup(Edje_Part_Collection *pc, int *src, int *dest) void data_queue_image_lookup(char *name, int *dest, Eina_Bool *set) { - Eina_List *l; + Eina_List *l, *ln; Image_Lookup *il; - EINA_LIST_FOREACH(image_lookups, l, il) + EINA_LIST_FOREACH_SAFE(image_lookups, l, ln, il) { if (il->dest == dest) { @@ -1548,7 +1548,7 @@ data_queue_image_lookup(char *name, int *dest, Eina_Bool *set) il->name = mem_strdup(name); else { - image_lookups = eina_list_remove(image_lookups, il); + image_lookups = eina_list_remove_list(image_lookups, l); free(il); } } -- 2.7.4