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:
parent
2fc1d7e3c7
commit
a20cacf53f
|
@ -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;
|
||||
|
||||
result = efl_provider_find(pd->parent, klass);
|
||||
|
||||
if (result) return result;
|
||||
|
||||
if (!pd->parent)
|
||||
return efl_provider_find(efl_super(obj, MY_CLASS), klass);
|
||||
|
||||
return efl_provider_find(pd->parent, klass);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue