zmike pushed a commit to branch efl-1.22.

http://git.enlightenment.org/core/efl.git/commit/?id=94ef4bf9c37d08178c614e7212fa03fb87f19243

commit 94ef4bf9c37d08178c614e7212fa03fb87f19243
Author: Marcel Hollerbach <[email protected]>
Date:   Fri Apr 26 18:54:24 2019 +0200

    efl_ui_pager: error when you try to delete something which unavailable
    
    Reviewed-by: Cedric BAIL <[email protected]>
    Differential Revision: https://phab.enlightenment.org/D8750
---
 src/lib/elementary/efl_ui_pager.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/lib/elementary/efl_ui_pager.c 
b/src/lib/elementary/efl_ui_pager.c
index 5ea11e1028..26a492d60b 100644
--- a/src/lib/elementary/efl_ui_pager.c
+++ b/src/lib/elementary/efl_ui_pager.c
@@ -862,7 +862,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);
 

-- 


Reply via email to