From 67bff8cf69bea6846324dcbdfc2caf49a0c17f3c Mon Sep 17 00:00:00 2001 From: Daniel Juyung Seo Date: Mon, 12 Dec 2011 17:50:49 +0900 Subject: [PATCH] [*][Genlist] Fixed genlist crash when genlist is cleared and focused. At this time, last_selected_item is updated with the wrong pointer. I fixed this to hold updated pointer all the time. This resolves CQ H0100137726. --- src/lib/elm_genlist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c index e9ec8fe..1419998 100644 --- a/src/lib/elm_genlist.c +++ b/src/lib/elm_genlist.c @@ -854,7 +854,6 @@ _item_del(Elm_Genlist_Item *it) elm_genlist_item_subitems_clear(it); it->wd->walking -= it->walking; if (it->wd->show_item == it) it->wd->show_item = NULL; - if (it->selected) it->wd->selected = eina_list_remove(it->wd->selected, it); if (it->realized) _item_unrealize(it, EINA_FALSE); if (it->effect_item_realized) _effect_item_unrealize(it); if (it->block) _item_block_del(it); @@ -1814,6 +1813,7 @@ _item_del_hook(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_i { Elm_Genlist_Item *it = event_info; if (!it) return; + if (it->selected) it->wd->selected = eina_list_remove(it->wd->selected, it); if (it->wd->last_selected_item == it) it->wd->last_selected_item = NULL; } -- 2.7.4