aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYeongJong Lee <yj34.lee@samsung.com>2018-01-24 18:49:04 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2018-01-24 18:49:04 +0900
commit8eda161f67f112d37c5f2627f333e3c73a9618e7 (patch)
tree9b13bcba23c82b335a076f592d9b7d32aa9a31c6
parentefl_ui_legacy: add new interface to indicate legacy widget (diff)
downloadefl-8eda161f67f112d37c5f2627f333e3c73a9618e7.tar.gz
efl_ui_focus_layer: avoid a call to NULL
Summary: efl_ui_focus_layer_enable_set(obj, EINA_FALSE) can be called before registered_manager assigned Test Plan: 1. EINA_LOG_LEVELS=eo:2 elementary_test -to menu 2. terminate the elemetary_test 3. check that there is no focus_manager warning about a call to NULL Reviewers: bu5hm4n Subscribers: cedric, jpeg Differential Revision: https://phab.enlightenment.org/D5759
-rw-r--r--src/lib/elementary/efl_ui_focus_layer.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/elementary/efl_ui_focus_layer.c b/src/lib/elementary/efl_ui_focus_layer.c
index 363b1742f5..9df3ed89b9 100644
--- a/src/lib/elementary/efl_ui_focus_layer.c
+++ b/src/lib/elementary/efl_ui_focus_layer.c
@@ -93,6 +93,8 @@ _efl_ui_focus_layer_enable_set(Eo *obj, Efl_Ui_Focus_Layer_Data *pd, Eina_Bool v
}
else
{
+ if (!pd->registered_manager) return;
+
if (efl_ui_focus_manager_redirect_get(pd->registered_manager) == obj)
efl_ui_focus_manager_redirect_set(pd->registered_manager, NULL);