elm/gengrid: handle cache item deletion without errors
authorMike Blumenkrantz <zmike@samsung.com>
Wed, 29 May 2019 13:17:24 +0000 (09:17 -0400)
committerWonki Kim <wonki_.kim@samsung.com>
Mon, 3 Jun 2019 06:58:35 +0000 (15:58 +0900)
Summary:
@fix
Depends on D8959

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8960

src/lib/elementary/elm_gengrid.c

index a9661c0..6506466 100755 (executable)
@@ -182,8 +182,12 @@ _item_cache_free(Item_Cache *itc)
    if (!itc) return;
 
    evas_object_del(itc->spacer);
-   efl_wref_del(itc->base_view, &itc->base_view);
-   efl_del(itc->base_view);
+   /* does not exist if cache item has just been reused */
+   if (itc->base_view)
+     {
+        efl_wref_del(itc->base_view, &itc->base_view);
+        efl_del(itc->base_view);
+     }
    eina_stringshare_del(itc->item_style);
    EINA_LIST_FREE(itc->contents, c)
      evas_object_del(c);