summaryrefslogtreecommitdiff
path: root/src/lib/elementary/efl_ui_focus_manager_calc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/elementary/efl_ui_focus_manager_calc.c')
-rw-r--r--src/lib/elementary/efl_ui_focus_manager_calc.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/elementary/efl_ui_focus_manager_calc.c b/src/lib/elementary/efl_ui_focus_manager_calc.c
index 3ccb48e8a6..29b52f2eb6 100644
--- a/src/lib/elementary/efl_ui_focus_manager_calc.c
+++ b/src/lib/elementary/efl_ui_focus_manager_calc.c
@@ -821,15 +821,16 @@ _efl_ui_focus_manager_calc_efl_ui_focus_manager_redirect_set(Eo *obj, Efl_Ui_Foc
821 821
822 old_manager = pd->redirect; 822 old_manager = pd->redirect;
823 823
824 if (pd->redirect) 824 if (old_manager)
825 efl_event_callback_del(pd->redirect, EFL_EVENT_DEL, _redirect_del, obj); 825 efl_event_callback_del(old_manager, EFL_EVENT_DEL, _redirect_del, obj);
826 826
827 pd->redirect = redirect; 827 pd->redirect = redirect;
828 828
829 if (pd->redirect) 829 if (pd->redirect)
830 efl_event_callback_add(pd->redirect, EFL_EVENT_DEL, _redirect_del, obj); 830 efl_event_callback_add(pd->redirect, EFL_EVENT_DEL, _redirect_del, obj);
831 831
832 efl_ui_focus_manager_reset_history(old_manager); 832 if (old_manager)
833 efl_ui_focus_manager_reset_history(old_manager);
833 834
834 //adjust focus property of the most upper element 835 //adjust focus property of the most upper element
835 if (_focus_manager_active_get(obj)) 836 if (_focus_manager_active_get(obj))