elm genlist: Fixed grid segfault issue. Patch by Hyoyoung Chang
authorseoz <seoz@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 20 Apr 2012 08:44:48 +0000 (08:44 +0000)
committerseoz <seoz@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 20 Apr 2012 08:44:48 +0000 (08:44 +0000)
<hyoyoung@gmail.com>

On Fri, Apr 20, 2012 at 4:10 PM, Hyoyoung Chang <hyoyoung@gmail.com>
wrote:
> Dear all,
>
> After introduced flipped mode to genlist, some clearing process is
> added to _elm_genlist_item_unrealize.
> In item _elm_genlist_item_unrealize, item is casting to gengrid item
> or genlist item.
> segfault is occurred in _elm_genlist_item_unrealize at using gengrid.
> this patch moves flipped mode clearing process to _item_realize_cb.
>
> Thanks.
>

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@70355 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/elm_genlist.c

index c86072b..8ef0851 100644 (file)
@@ -2253,6 +2253,12 @@ _item_realize(Elm_Gen_Item *it,
 static void
 _item_unrealize_cb(Elm_Gen_Item *it)
 {
 static void
 _item_unrealize_cb(Elm_Gen_Item *it)
 {
+   Evas_Object *content;
+   elm_widget_stringlist_free(it->item->flip_contents);
+   it->item->flip_contents = NULL;
+   EINA_LIST_FREE(it->item->flip_content_objs, content)
+     evas_object_del(content);
+
    if (it->item->nocache_once || it->item->nocache)
      {
         evas_object_del(VIEW(it));
    if (it->item->nocache_once || it->item->nocache)
      {
         evas_object_del(VIEW(it));
@@ -5878,11 +5884,6 @@ _elm_genlist_item_unrealize(Elm_Gen_Item *it,
    EINA_LIST_FREE(it->content_objs, content)
      evas_object_del(content);
 
    EINA_LIST_FREE(it->content_objs, content)
      evas_object_del(content);
 
-   elm_widget_stringlist_free(it->item->flip_contents);
-   it->item->flip_contents = NULL;
-   EINA_LIST_FREE(it->item->flip_content_objs, content)
-     evas_object_del(content);
-
    it->unrealize_cb(it);
 
    it->realized = EINA_FALSE;
    it->unrealize_cb(it);
 
    it->realized = EINA_FALSE;