efl_ui_pager: error when you try to delete something which unavailable

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8750
This commit is contained in:
Marcel Hollerbach 2019-04-26 18:54:24 +02:00
parent 79bc6ed244
commit 3fd16508a6
1 changed files with 5 additions and 1 deletions

View File

@ -907,7 +907,11 @@ _efl_ui_pager_efl_pack_unpack(Eo *obj,
if (!subobj) return EINA_FALSE;
int index = eina_list_data_idx(pd->content_list, subobj);
if (index == -1) return EINA_FALSE;
if (index == -1)
{
ERR("You can only unpack items that have been added before");
return EINA_FALSE;
}
_unpack(obj, pd, subobj, index);