summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/elm_genlist.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c
index 0448de108..58f3b90a6 100644
--- a/src/lib/elm_genlist.c
+++ b/src/lib/elm_genlist.c
@@ -5585,9 +5585,8 @@ _elm_genlist_eo_base_constructor(Eo *obj, Elm_Genlist_Data *sd)
5585static void 5585static void
5586_internal_elm_genlist_clear(Evas_Object *obj) 5586_internal_elm_genlist_clear(Evas_Object *obj)
5587{ 5587{
5588 Eina_Inlist *next, *l;
5589
5590 ELM_GENLIST_DATA_GET(obj, sd); 5588 ELM_GENLIST_DATA_GET(obj, sd);
5589 Elm_Gen_Item *it;
5591 5590
5592 _elm_genlist_item_unfocused(sd->focused_item); 5591 _elm_genlist_item_unfocused(sd->focused_item);
5593 if (sd->mode_item) sd->mode_item = NULL; 5592 if (sd->mode_item) sd->mode_item = NULL;
@@ -5597,11 +5596,9 @@ _internal_elm_genlist_clear(Evas_Object *obj)
5597 evas_event_freeze(evas_object_evas_get(sd->obj)); 5596 evas_event_freeze(evas_object_evas_get(sd->obj));
5598 // Do not use EINA_INLIST_FOREACH or EINA_INLIST_FOREACH_SAFE 5597 // Do not use EINA_INLIST_FOREACH or EINA_INLIST_FOREACH_SAFE
5599 // because sd->items can be modified inside elm_widget_item_del() 5598 // because sd->items can be modified inside elm_widget_item_del()
5600 for (l = sd->items, next = l ? l->next : NULL; 5599 while (sd->items)
5601 l;
5602 l = next, next = next ? next->next : NULL)
5603 { 5600 {
5604 Elm_Gen_Item *it = ELM_GEN_ITEM_FROM_INLIST(l); 5601 it = EINA_INLIST_CONTAINER_GET(sd->items->last, Elm_Gen_Item);
5605 eo_do(EO_OBJ(it), elm_wdg_item_del()); 5602 eo_do(EO_OBJ(it), elm_wdg_item_del());
5606 } 5603 }
5607 sd->pan_changed = EINA_TRUE; 5604 sd->pan_changed = EINA_TRUE;