aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/elementary/efl_ui_widget.c
diff options
context:
space:
mode:
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