summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-05-29 09:16:41 -0400
committerMike Blumenkrantz <zmike@samsung.com>2019-05-29 12:29:03 -0400
commit0dc166adbd08e57187f2470f7abe479a4116003e (patch)
tree1c03f34568a66ddd89e61c07e77dedc92a05dd17
parent9c2547db0c8b905c1b5393bfffe0a6625e7774a9 (diff)
efl_ui_focus_manager/calc: handle redirect setting if no previous redirect set
Summary: use same pointer for conditional to improve readability, avoid passing null to efl_ui_focus_manager_reset_history() which cannot be passed null @fix Depends on D8952 Reviewers: bu5hm4n Reviewed By: bu5hm4n Subscribers: bu5hm4n, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8953
-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))