fix unsafe list removal while walking it
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>
Fri, 18 Oct 2013 12:39:53 +0000 (21:39 +0900)
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>
Fri, 18 Oct 2013 12:39:53 +0000 (21:39 +0900)
src/bin/e_pointer.c

index 11c0f0b652626e84e0c64ed184d92df86c393a22..021f5650232e96215c2fd145f425398779319684 100644 (file)
@@ -178,11 +178,11 @@ e_pointer_type_pop(E_Pointer *p,
                    void *obj,
                    const char *type)
 {
-   Eina_List *l;
+   Eina_List *l, *l_next;
    E_Pointer_Stack *stack;
 
    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))))
           {