summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChunEon Park <hermet@hermet.pe.kr>2015-01-14 23:30:43 +0900
committerChunEon Park <hermet@hermet.pe.kr>2015-01-14 23:30:43 +0900
commitc80b24baf815e35c160bf0dbe8ecae6ea247aef8 (patch)
tree8f2ec75e8fb7d797b9eef952e1cc3ed242949671
parentad5c83b6686370acc7300a1eb3a39bb6a47b9571 (diff)
genlist: fix a crash when deleting a item in selected callback.
if user deletes the item in the callback, current function(_item_select) would be corrupted. just leave the callback call in the last of the function.
-rw-r--r--src/lib/elm_genlist.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c
index a4ebbf89b..81d6246ab 100644
--- a/src/lib/elm_genlist.c
+++ b/src/lib/elm_genlist.c
@@ -5669,9 +5669,6 @@ _item_select(Elm_Gen_Item *it)
5669 eina_list_append(sd->selected, eo_it); 5669 eina_list_append(sd->selected, eo_it);
5670 } 5670 }
5671 5671
5672 evas_object_ref(obj);
5673 if (it->func.func) it->func.func((void *)it->func.data, WIDGET(it), eo_it);
5674 evas_object_smart_callback_call(WIDGET(it), SIG_SELECTED, eo_it);
5675 elm_object_item_focus_set(eo_it, EINA_TRUE); 5672 elm_object_item_focus_set(eo_it, EINA_TRUE);
5676 _elm_genlist_item_content_focus_set(it, ELM_FOCUS_PREVIOUS); 5673 _elm_genlist_item_content_focus_set(it, ELM_FOCUS_PREVIOUS);
5677 5674
@@ -5692,6 +5689,12 @@ _item_select(Elm_Gen_Item *it)
5692 } 5689 }
5693 } 5690 }
5694 5691
5692 evas_object_ref(obj);
5693
5694 if (it->func.func) it->func.func((void *)it->func.data, WIDGET(it), eo_it);
5695 if (EINA_MAGIC_CHECK((Elm_Widget_Item_Data *)it, ELM_WIDGET_ITEM_MAGIC))
5696 evas_object_smart_callback_call(WIDGET(it), SIG_SELECTED, eo_it);
5697
5695 evas_object_unref(obj); 5698 evas_object_unref(obj);
5696} 5699}
5697 5700