[Genlist] Fix crashes when another item is sweeped after sweeped item is
authorTae-Hwan Kim <the81.kim@samsung.com>
Mon, 15 Jul 2013 05:14:40 +0000 (14:14 +0900)
committerTae-Hwan Kim <the81.kim@samsung.com>
Wed, 31 Jul 2013 07:22:17 +0000 (16:22 +0900)
deleted

Change-Id: Ie1134290c9bdd8503cf3f1b9c067391bd0729659

src/lib/elm_genlist.c

index 4e76667..ea1c3ea 100644 (file)
@@ -5201,7 +5201,8 @@ _item_free_common(Elm_Gen_Item *it)
    if (sd->last_selected_item == (Elm_Object_Item *)it)
      sd->last_selected_item = NULL;
 
-   if (it == GL_IT(it)->wsd->focused) _item_unfocused(it);
+   if (sd->mode_item) sd->mode_item = NULL;
+   if (it == sd->focused) _item_unfocused(it);
    if (it == sd->access_it) sd->access_it = NULL;
    if (it == sd->access_bring_it) sd->access_bring_it = NULL;
    if (it == sd->access_unrealize_it) sd->access_unrealize_it = NULL;
@@ -5767,6 +5768,7 @@ elm_genlist_clear(Evas_Object *obj)
 
    eina_hash_free_buckets(sd->size_caches);
    _item_unfocused(sd->focused);
+   if (sd->mode_item) sd->mode_item = NULL;
    if (sd->access_it) sd->access_it = NULL;
    if (sd->access_bring_it) sd->access_bring_it = NULL;
    if (sd->access_unrealize_it) sd->access_unrealize_it = NULL;