summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzmike <michael.blumenkrantz@gmail.com>2014-03-23 03:10:15 -0400
committerMike Blumenkrantz <zmike@samsung.com>2014-03-23 03:12:06 -0400
commited2dd62702ce5c63b2a6bc31fa5ac95c757489f4 (patch)
tree3f06a2930ea208f05976b8d7a8d56f695e44b108
parent4557eb5d5012971c23d323b50878866540845f9b (diff)
genlist needs to iterate exactly once over a fixed list when deselcting all items
the selected items list can be modified during deselect from the smart callback, which can cause an infinite loop here @fix
-rw-r--r--src/lib/elm_genlist.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c
index 94af9a0dd..b4c965bac 100644
--- a/src/lib/elm_genlist.c
+++ b/src/lib/elm_genlist.c
@@ -2368,10 +2368,14 @@ _item_multi_select_down(Elm_Genlist_Smart_Data *sd)
2368static Eina_Bool 2368static Eina_Bool
2369_all_items_deselect(Elm_Genlist_Smart_Data *sd) 2369_all_items_deselect(Elm_Genlist_Smart_Data *sd)
2370{ 2370{
2371 Eina_List *l;
2372 Elm_Object_Item *it;
2373
2371 if (!sd->selected) return EINA_FALSE; 2374 if (!sd->selected) return EINA_FALSE;
2372 2375
2373 while (sd->selected) 2376 l = eina_list_clone(sd->selected);
2374 elm_genlist_item_selected_set(sd->selected->data, EINA_FALSE); 2377 EINA_LIST_FREE(l, it)
2378 elm_genlist_item_selected_set(it, EINA_FALSE);
2375 2379
2376 return EINA_TRUE; 2380 return EINA_TRUE;
2377} 2381}