diff options
author | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2021-01-03 19:35:20 +0000 |
---|---|---|
committer | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2021-01-03 19:36:50 +0000 |
commit | c3577929b38803b6454cfb1a9cc552cd52d082d2 (patch) | |
tree | 1fd9c8bedde8405c22ac4a0c108095ac5b56bb9b /src/lib | |
parent | b27a0f2b2d72256b62c9937042b8df176f1ed248 (diff) |
elm - genlist - fix leak if someone steals objects on unrealize
elm_genlist_item_all_contents_unset() can steal away the item content.
this is how you do a cache of your own objects... BUT this meant
genlist couldnt remove its hash entires... as it lost them. this fixes
that. leak fixed. (this affected evisum)
@fix
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/elementary/elm_genlist.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/elementary/elm_genlist.c b/src/lib/elementary/elm_genlist.c index d25dbe1f57..342d26e0d3 100644 --- a/src/lib/elementary/elm_genlist.c +++ b/src/lib/elementary/elm_genlist.c | |||
@@ -7410,6 +7410,7 @@ _elm_genlist_item_all_contents_unset(Eo *eo_item EINA_UNUSED, Elm_Gen_Item *it, | |||
7410 | Evas_Object *content; | 7410 | Evas_Object *content; |
7411 | 7411 | ||
7412 | ELM_GENLIST_ITEM_CHECK_OR_RETURN(it); | 7412 | ELM_GENLIST_ITEM_CHECK_OR_RETURN(it); |
7413 | ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd); | ||
7413 | 7414 | ||
7414 | EINA_LIST_FREE(it->contents, content) | 7415 | EINA_LIST_FREE(it->contents, content) |
7415 | { | 7416 | { |
@@ -7417,6 +7418,7 @@ _elm_genlist_item_all_contents_unset(Eo *eo_item EINA_UNUSED, Elm_Gen_Item *it, | |||
7417 | edje_object_part_unswallow(VIEW(it), content); | 7418 | edje_object_part_unswallow(VIEW(it), content); |
7418 | evas_object_hide(content); | 7419 | evas_object_hide(content); |
7419 | if (l) *l = eina_list_append(*l, content); | 7420 | if (l) *l = eina_list_append(*l, content); |
7421 | eina_hash_del_by_key(sd->content_item_map, &content); | ||
7420 | } | 7422 | } |
7421 | } | 7423 | } |
7422 | 7424 | ||