aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/elementary/efl_ui_widget.c
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2019-08-22 00:22:12 +0100
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2019-08-22 00:22:39 +0100
commitaa21bd3c60624fa58a17c89bb9a0e32eca0bc85e (patch)
treef2ea9dc4dee7bebc601db4da83514d4dad25681f /src/lib/elementary/efl_ui_widget.c
parentevas/object: remove errors when user min/max size hints conflict (diff)
downloadefl-aa21bd3c60624fa58a17c89bb9a0e32eca0bc85e.tar.gz
elm - efl ui - dont crash if parent is not an elm widget
Diffstat (limited to '')
-rw-r--r--src/lib/elementary/efl_ui_widget.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/lib/elementary/efl_ui_widget.c b/src/lib/elementary/efl_ui_widget.c
index e03c67c542..57020ed281 100644
--- a/src/lib/elementary/efl_ui_widget.c
+++ b/src/lib/elementary/efl_ui_widget.c
@@ -4801,7 +4801,14 @@ _efl_ui_widget_efl_object_constructor(Eo *obj, Elm_Widget_Smart_Data *sd EINA_UN
parent, evas_object_type_get(parent));
}
ELM_WIDGET_DATA_GET(parent, parent_sd);
- sd->shared_win_data = parent_sd->shared_win_data;
+ if (parent_sd)
+ sd->shared_win_data = parent_sd->shared_win_data;
+ else
+ {
+ ELM_WIDGET_DATA_GET(sd->window, window_sd);
+ if (window_sd)
+ sd->shared_win_data = window_sd->shared_win_data;
+ }
efl_ui_widget_sub_object_add(parent, obj);
}
else