summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYeongJong Lee <yj34.lee@samsung.com>2018-01-31 14:29:12 +0100
committerMarcel Hollerbach <marcel@osg.samsung.com>2018-01-31 14:29:12 +0100
commita20cacf53f4c85d10048c86c96ae92db0de6fff1 (patch)
treec2e5c3460cc042154fdb3fa00b81c423a0d5a1e1
parent2fc1d7e3c7ed97806b66dc2dba8bb90ca0fcd858 (diff)
elm_menu: avoid a call to NULL
Summary: the provider_find can be called before parent_set in constructor. Test Plan: 1. EINA_LOG_LEVELS=eo:2 elementary_test -to menu 2. check that there is no warning message about efl_provider_find Reviewers: jpeg, bu5hm4n Reviewed By: bu5hm4n Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D5773
-rw-r--r--src/lib/elementary/elm_menu.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/lib/elementary/elm_menu.c b/src/lib/elementary/elm_menu.c
index 0e2bd3b1e6..00d1b50e1a 100644
--- a/src/lib/elementary/elm_menu.c
+++ b/src/lib/elementary/elm_menu.c
@@ -1509,13 +1509,10 @@ _elm_menu_efl_access_selection_selected_child_get(Eo *obj EINA_UNUSED, Elm_Menu_
1509EOLIAN static Efl_Object* 1509EOLIAN static Efl_Object*
1510_elm_menu_efl_object_provider_find(const Eo *obj, Elm_Menu_Data *pd, const Efl_Object *klass) 1510_elm_menu_efl_object_provider_find(const Eo *obj, Elm_Menu_Data *pd, const Efl_Object *klass)
1511{ 1511{
1512 Efl_Object *result; 1512 if (!pd->parent)
1513 return efl_provider_find(efl_super(obj, MY_CLASS), klass);
1513 1514
1514 result = efl_provider_find(pd->parent, klass); 1515 return efl_provider_find(pd->parent, klass);
1515
1516 if (result) return result;
1517
1518 return efl_provider_find(efl_super(obj, MY_CLASS), klass);
1519} 1516}
1520 1517
1521 1518