From baa787008269a26f79dc1f95f4d0ce0d9d16a204 Mon Sep 17 00:00:00 2001 From: Marcel Hollerbach Date: Fri, 17 Jan 2020 14:40:58 +0100 Subject: [PATCH] evas_object_box: fix invalidator the iteration over the content of the box did never cleanup the children pointer, which resulted in buggy behavior. This fixes test suite crashes with freeq debugging on. Reviewed-by: Mike Blumenkrantz Differential Revision: https://phab.enlightenment.org/D11123 --- src/lib/evas/canvas/evas_object_box.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/lib/evas/canvas/evas_object_box.c b/src/lib/evas/canvas/evas_object_box.c index 7a7173eb25..7853ee3e10 100644 --- a/src/lib/evas/canvas/evas_object_box.c +++ b/src/lib/evas/canvas/evas_object_box.c @@ -412,18 +412,16 @@ _evas_box_efl_canvas_group_group_add(Eo *eo_obj, Evas_Object_Box_Data *priv) EOLIAN static void _evas_box_efl_canvas_group_group_del(Eo *o, Evas_Object_Box_Data *priv) { - Eina_List *l; - - l = priv->children; - while (l) + while (priv->children) { - Evas_Object_Box_Option *opt = l->data; + Evas_Object_Box_Option *opt = eina_list_data_get(priv->children); _evas_object_box_child_callbacks_unregister(opt->obj, o); evas_obj_box_internal_option_free(o, opt); - l = eina_list_remove_list(l, l); + priv->children = eina_list_remove_list(priv->children, priv->children); } + if (priv->layout.data && priv->layout.free_data) priv->layout.free_data(priv->layout.data);