summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-05-29 09:17:24 -0400
committerMike Blumenkrantz <zmike@samsung.com>2019-05-29 12:29:03 -0400
commit1ba2a99b9a8e96f60e31aa48fe6126307e8983b2 (patch)
tree1fb88097a934e2237b95eb2ebabbc2b618c54468
parenta9ef4ab348ccbd545256e1d5fb5f219b298e16de (diff)
downloadefl-1ba2a99b9a8e96f60e31aa48fe6126307e8983b2.tar.gz
elm/gengrid: handle cache item deletion without errors
Summary: @fix Depends on D8959 Reviewers: devilhorns Reviewed By: devilhorns Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8960
-rw-r--r--src/lib/elementary/elm_gengrid.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lib/elementary/elm_gengrid.c b/src/lib/elementary/elm_gengrid.c
index 6f73fdfca7..50b0996a37 100644
--- a/src/lib/elementary/elm_gengrid.c
+++ b/src/lib/elementary/elm_gengrid.c
@@ -162,8 +162,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);