summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2019-09-06 14:00:32 +0200
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-09-06 16:20:36 +0200
commitc9632390864adcb3b107c7d4a5d129d3ae0d3597 (patch)
tree827b95c7f7fdf63c1d81487b2d35a5e541d30547
parentfcd3d82c101e3e10c4f2dd816b1db645e7b919d6 (diff)
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 <michael.blumenkrantz@gmail.com> Differential Revision: https://phab.enlightenment.org/D9862
-rw-r--r--src/lib/elementary/efl_ui_tab_bar.c2
1 files changed, 2 insertions, 0 deletions
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
186EOLIAN static Eina_Bool 186EOLIAN static Eina_Bool
187_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) 187_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)
188{ 188{
189 EINA_SAFETY_ON_FALSE_RETURN_VAL(efl_pack_index_get(pd->bx, existing) >= 0, EINA_FALSE);
189 EINA_SAFETY_ON_FALSE_RETURN_VAL(_register_item(obj, pd, subobj), EINA_FALSE); 190 EINA_SAFETY_ON_FALSE_RETURN_VAL(_register_item(obj, pd, subobj), EINA_FALSE);
190 return efl_pack_before(pd->bx, subobj, existing); 191 return efl_pack_before(pd->bx, subobj, existing);
191} 192}
@@ -193,6 +194,7 @@ _efl_ui_tab_bar_efl_pack_linear_pack_before(Eo *obj, Efl_Ui_Tab_Bar_Data *pd, Ef
193EOLIAN static Eina_Bool 194EOLIAN static Eina_Bool
194_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) 195_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)
195{ 196{
197 EINA_SAFETY_ON_FALSE_RETURN_VAL(efl_pack_index_get(pd->bx, existing) >= 0, EINA_FALSE);
196 EINA_SAFETY_ON_FALSE_RETURN_VAL(_register_item(obj, pd, subobj), EINA_FALSE); 198 EINA_SAFETY_ON_FALSE_RETURN_VAL(_register_item(obj, pd, subobj), EINA_FALSE);
197 return efl_pack_after(pd->bx, subobj, existing); 199 return efl_pack_after(pd->bx, subobj, existing);
198} 200}