efl_ui_grid: do not delete a item that is not part of this container

otherwise we start to delete callbacks etc. on a widget that we do not
have.

Reviewed-by: SangHyeon Jade Lee <sh10233.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D8706
This commit is contained in:
Marcel Hollerbach 2019-04-24 19:16:57 +02:00
parent 080342d82e
commit 874e07550d
1 changed files with 6 additions and 0 deletions

View File

@ -1063,6 +1063,12 @@ _efl_ui_grid_efl_pack_unpack(Eo *obj, Efl_Ui_Grid_Data *pd, Efl_Gfx_Entity *subo
{
Efl_Ui_Grid_Item *item = (Efl_Ui_Grid_Item *)subobj;
if (!eina_list_data_find(pd->items, item))
{
ERR("Element is not part of this container");
return EINA_FALSE;
}
_grid_item_unpack_internal(obj, pd, item);
elm_layout_sizing_eval(obj);