zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=d79cc48fca6c905d486e14d759f3bdf79375ae25
commit d79cc48fca6c905d486e14d759f3bdf79375ae25 Author: Jaehyun Cho <jae_hyun....@samsung.com> Date: Wed Apr 24 14:44:19 2019 +0900 efl_ui_stack: handle memory allocation fail check if memory allocation succeeds and handle memory allocation fail. --- src/lib/elementary/efl_ui_stack.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/lib/elementary/efl_ui_stack.c b/src/lib/elementary/efl_ui_stack.c index e7edcdaf57..c330fada92 100644 --- a/src/lib/elementary/efl_ui_stack.c +++ b/src/lib/elementary/efl_ui_stack.c @@ -162,6 +162,15 @@ _show_content_with_anim(Efl_Ui_Stack *obj, Efl_Ui_Stack_Data *pd, Content_Data * efl_animation_player_target_set(pd->show, cd->content); Transit_Data *td = calloc(1, sizeof(Transit_Data)); + if (!td) + { + ERR("Memory allocation error!"); + + //show content without animation + _show_content_without_anim(obj, cd->content); + return; + } + td->cd = cd; pd->show_td = td; @@ -185,6 +194,15 @@ _hide_content_with_anim(Efl_Ui_Stack *obj EINA_UNUSED, Efl_Ui_Stack_Data *pd, Co efl_animation_player_target_set(pd->hide, cd->content); Transit_Data *td = calloc(1, sizeof(Transit_Data)); + if (!td) + { + ERR("Memory allocation error!"); + + //hide content without animation + _hide_content_without_anim(obj, cd->content); + return; + } + td->cd = cd; pd->hide_td = td; --