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)
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)
162 if (!itc) return; 162 if (!itc) return;
163 163
164 evas_object_del(itc->spacer); 164 evas_object_del(itc->spacer);
165 efl_wref_del(itc->base_view, &itc->base_view); 165 /* does not exist if cache item has just been reused */
166 efl_del(itc->base_view); 166 if (itc->base_view)
167 {
168 efl_wref_del(itc->base_view, &itc->base_view);
169 efl_del(itc->base_view);
170 }
167 eina_stringshare_del(itc->item_style); 171 eina_stringshare_del(itc->item_style);
168 EINA_LIST_FREE(itc->contents, c) 172 EINA_LIST_FREE(itc->contents, c)
169 evas_object_del(c); 173 evas_object_del(c);