From 6edf0c8e375dc55a5b6c88290256e71eed66e620 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Wed, 29 May 2019 09:18:09 -0400 Subject: [PATCH] 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 --- src/lib/elementary/elm_hover.c | 3 ++- src/lib/elementary/elm_notify.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib/elementary/elm_hover.c b/src/lib/elementary/elm_hover.c index 634267d..a1afeed 100644 --- a/src/lib/elementary/elm_hover.c +++ b/src/lib/elementary/elm_hover.c @@ -761,7 +761,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); } diff --git a/src/lib/elementary/elm_notify.c b/src/lib/elementary/elm_notify.c index 3737032..8737156 100644 --- a/src/lib/elementary/elm_notify.c +++ b/src/lib/elementary/elm_notify.c @@ -674,7 +674,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); } -- 2.7.4