Compare commits

...

2 Commits

Author SHA1 Message Date
Marcel Hollerbach ea742648ad efl_ui_suite: fix test code of grid
this test code seemed buggy, we used the iterator *after* the content
was changed. Additionally, we freed the iterator with free instead of
eina_iterator_free.

This fixes test test suite.

Differential Revision: https://phab.enlightenment.org/D11124
2020-01-17 14:46:53 +01:00
Marcel Hollerbach 59272b1530 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.

Differential Revision: https://phab.enlightenment.org/D11123
2020-01-17 14:46:44 +01:00
2 changed files with 7 additions and 10 deletions

View File

@ -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);

View File

@ -89,16 +89,15 @@ EFL_START_TEST(efl_ui_grid_unpack_all)
ck_assert(grid_item_pack(grid, count_before, NULL) != EINA_FALSE);
itor = efl_content_iterate(grid);
efl_pack_unpack_all(grid);
count = efl_content_count(grid);
ck_assert(count == 0);
itor = efl_content_iterate(grid);
EINA_ITERATOR_FOREACH(itor, item)
efl_del(item);
free(itor);
ck_assert(EINA_FALSE);
eina_iterator_free(itor);
}
EFL_END_TEST