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
This commit is contained in:
YeongJong Lee 2018-01-31 14:29:12 +01:00 committed by Marcel Hollerbach
parent 2fc1d7e3c7
commit a20cacf53f
1 changed files with 3 additions and 6 deletions

View File

@ -1509,13 +1509,10 @@ _elm_menu_efl_access_selection_selected_child_get(Eo *obj EINA_UNUSED, Elm_Menu_
EOLIAN static Efl_Object*
_elm_menu_efl_object_provider_find(const Eo *obj, Elm_Menu_Data *pd, const Efl_Object *klass)
{
Efl_Object *result;
if (!pd->parent)
return efl_provider_find(efl_super(obj, MY_CLASS), klass);
result = efl_provider_find(pd->parent, klass);
if (result) return result;
return efl_provider_find(efl_super(obj, MY_CLASS), klass);
return efl_provider_find(pd->parent, klass);
}