diff --git a/ivi-shell/ivi-layout-transition.c b/ivi-shell/ivi-layout-transition.c index adaa543c..483437db 100644 --- a/ivi-shell/ivi-layout-transition.c +++ b/ivi-shell/ivi-layout-transition.c @@ -418,7 +418,9 @@ ivi_layout_transition_move_resize_view(struct ivi_layout_surface *surface, transition_move_resize_view_destroy, duration); - layout_transition_register(transition); + if(transition && layout_transition_register(transition)) + return; + layout_transition_destroy(transition); } /* fade transition */ @@ -512,8 +514,9 @@ create_visibility_transition(struct ivi_layout_surface *surface, destroy_func, duration); - if (!layout_transition_register(transition)) - layout_transition_destroy(transition); + if (transition && layout_transition_register(transition)) + return; + layout_transition_destroy(transition); } static void