elm/hovers: don't trigger more errors when setting null hover parent

Summary:
null is not a valid subobject, do not attempt to add it

@fix
Depends on D8963

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: devilhorns, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8964
This commit is contained in:
Mike Blumenkrantz 2019-05-29 09:18:09 -04:00
parent 2e8f714979
commit bd5d957364
2 changed files with 4 additions and 2 deletions

View File

@ -759,7 +759,8 @@ elm_hover_parent_set(Evas_Object *obj,
{
ELM_HOVER_CHECK(obj);
ELM_HOVER_DATA_GET(obj, sd);
efl_ui_widget_sub_object_add(parent, obj);
if (parent)
efl_ui_widget_sub_object_add(parent, obj);
_parent_setup(obj, sd, parent);
}

View File

@ -537,7 +537,8 @@ elm_notify_parent_set(Evas_Object *obj,
{
ELM_NOTIFY_CHECK(obj);
ELM_NOTIFY_DATA_GET(obj, sd);
efl_ui_widget_sub_object_add(parent, obj);
if (parent)
efl_ui_widget_sub_object_add(parent, obj);
_parent_setup(obj, sd, parent);
}