bu5hm4n pushed a commit to branch master.

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

commit c9632390864adcb3b107c7d4a5d129d3ae0d3597
Author: Marcel Hollerbach <[email protected]>
Date:   Fri Sep 6 14:00:32 2019 +0200

    efl_ui_tab_bar: do not perform insertion if existing is not added
    
    same as the previous commit, just for efl_ui_tab_bar.
    
    Reviewed-by: Mike Blumenkrantz <[email protected]>
    Differential Revision: https://phab.enlightenment.org/D9862
---
 src/lib/elementary/efl_ui_tab_bar.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/lib/elementary/efl_ui_tab_bar.c 
b/src/lib/elementary/efl_ui_tab_bar.c
index a988a56b21..05e32cadd1 100644
--- a/src/lib/elementary/efl_ui_tab_bar.c
+++ b/src/lib/elementary/efl_ui_tab_bar.c
@@ -186,6 +186,7 @@ _efl_ui_tab_bar_efl_pack_linear_pack_end(Eo *obj, 
Efl_Ui_Tab_Bar_Data *pd, Efl_G
 EOLIAN static Eina_Bool
 _efl_ui_tab_bar_efl_pack_linear_pack_before(Eo *obj, Efl_Ui_Tab_Bar_Data *pd, 
Efl_Gfx_Entity *subobj, const Efl_Gfx_Entity *existing)
 {
+   EINA_SAFETY_ON_FALSE_RETURN_VAL(efl_pack_index_get(pd->bx, existing) >= 0, 
EINA_FALSE);
    EINA_SAFETY_ON_FALSE_RETURN_VAL(_register_item(obj, pd, subobj), 
EINA_FALSE);
    return efl_pack_before(pd->bx, subobj, existing);
 }
@@ -193,6 +194,7 @@ _efl_ui_tab_bar_efl_pack_linear_pack_before(Eo *obj, 
Efl_Ui_Tab_Bar_Data *pd, Ef
 EOLIAN static Eina_Bool
 _efl_ui_tab_bar_efl_pack_linear_pack_after(Eo *obj, Efl_Ui_Tab_Bar_Data *pd, 
Efl_Gfx_Entity *subobj, const Efl_Gfx_Entity *existing)
 {
+   EINA_SAFETY_ON_FALSE_RETURN_VAL(efl_pack_index_get(pd->bx, existing) >= 0, 
EINA_FALSE);
    EINA_SAFETY_ON_FALSE_RETURN_VAL(_register_item(obj, pd, subobj), 
EINA_FALSE);
    return efl_pack_after(pd->bx, subobj, existing);
 }

-- 


Reply via email to