fix unsafe list removal while walking it

This commit is contained in:
Carsten Haitzler 2013-10-18 21:39:53 +09:00
parent 19da294e8d
commit a4b70e791a
1 changed files with 2 additions and 2 deletions

View File

@ -178,11 +178,11 @@ e_pointer_type_pop(E_Pointer *p,
void *obj, void *obj,
const char *type) const char *type)
{ {
Eina_List *l; Eina_List *l, *l_next;
E_Pointer_Stack *stack; E_Pointer_Stack *stack;
if (!p) return; if (!p) return;
EINA_LIST_FOREACH(p->stack, l, stack) EINA_LIST_FOREACH_SAFE(p->stack, l, l_next, stack)
{ {
if ((stack->obj == obj) && ((!type) || (!strcmp(stack->type, type)))) if ((stack->obj == obj) && ((!type) || (!strcmp(stack->type, type))))
{ {