diff options
author | Marcel Hollerbach <mail@marcel-hollerbach.de> | 2019-09-06 13:55:28 +0200 |
---|---|---|
committer | Marcel Hollerbach <mail@marcel-hollerbach.de> | 2019-09-06 16:20:23 +0200 |
commit | 9284418bea8debf33024cce88c971c02c518b4b6 (patch) | |
tree | 8576cfb0a1edd45ac824ca0e2ee29e1a42e2ea85 | |
parent | 588745e9956ba622aadc9fe6f11988a372687d39 (diff) |
efl_ui_box: do not perform insertion if existing is not added
this was brought up recently and it is true that this should be fixed.
If existing is not registered in the container, then we should not
perform the operation at all.
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9860
-rw-r--r-- | src/lib/elementary/efl_ui_box.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/elementary/efl_ui_box.c b/src/lib/elementary/efl_ui_box.c index 58b77f1d40..04533f997e 100644 --- a/src/lib/elementary/efl_ui_box.c +++ b/src/lib/elementary/efl_ui_box.c | |||
@@ -282,6 +282,8 @@ _efl_ui_box_efl_pack_linear_pack_begin(Eo *obj, Efl_Ui_Box_Data *pd, Efl_Gfx_Ent | |||
282 | EOLIAN static Eina_Bool | 282 | EOLIAN static Eina_Bool |
283 | _efl_ui_box_efl_pack_linear_pack_before(Eo *obj, Efl_Ui_Box_Data *pd, Efl_Gfx_Entity *subobj, const Efl_Gfx_Entity *existing) | 283 | _efl_ui_box_efl_pack_linear_pack_before(Eo *obj, Efl_Ui_Box_Data *pd, Efl_Gfx_Entity *subobj, const Efl_Gfx_Entity *existing) |
284 | { | 284 | { |
285 | EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_list_data_find(pd->children, existing), EINA_FALSE); | ||
286 | |||
285 | if (!_efl_ui_box_child_register(obj, pd, subobj)) | 287 | if (!_efl_ui_box_child_register(obj, pd, subobj)) |
286 | return EINA_FALSE; | 288 | return EINA_FALSE; |
287 | 289 | ||
@@ -293,6 +295,8 @@ _efl_ui_box_efl_pack_linear_pack_before(Eo *obj, Efl_Ui_Box_Data *pd, Efl_Gfx_En | |||
293 | EOLIAN static Eina_Bool | 295 | EOLIAN static Eina_Bool |
294 | _efl_ui_box_efl_pack_linear_pack_after(Eo *obj, Efl_Ui_Box_Data *pd, Efl_Gfx_Entity *subobj, const Efl_Gfx_Entity *existing) | 296 | _efl_ui_box_efl_pack_linear_pack_after(Eo *obj, Efl_Ui_Box_Data *pd, Efl_Gfx_Entity *subobj, const Efl_Gfx_Entity *existing) |
295 | { | 297 | { |
298 | EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_list_data_find(pd->children, existing), EINA_FALSE); | ||
299 | |||
296 | if (!_efl_ui_box_child_register(obj, pd, subobj)) | 300 | if (!_efl_ui_box_child_register(obj, pd, subobj)) |
297 | return EINA_FALSE; | 301 | return EINA_FALSE; |
298 | 302 | ||