From 03d52c591dce5b1ec5bddd43872e8ad91bbe1109 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Sat, 21 Sep 2019 10:26:46 +0100 Subject: [PATCH] efl ui widget - call parent constructor before doing more init the object is not properly set up yet for child classes -0 parent like the main evas object or smart obj havent been constructed yet so call this really early, not in the middle of construction of an efl ui widget... this fixes a segv in elementary_test -to filp where it segv's on object construction where evas object ->cur/prev are NULL (not set up yet). --- src/lib/elementary/efl_ui_widget.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/elementary/efl_ui_widget.c b/src/lib/elementary/efl_ui_widget.c index 1dd99f6..22af83e 100644 --- a/src/lib/elementary/efl_ui_widget.c +++ b/src/lib/elementary/efl_ui_widget.c @@ -5617,6 +5617,8 @@ _focus_event_changed(void *data EINA_UNUSED, const Efl_Event *event) EOLIAN static Eo * _efl_ui_widget_efl_object_constructor(Eo *obj, Elm_Widget_Smart_Data *sd EINA_UNUSED) { + efl_canvas_group_clipped_set(obj, EINA_FALSE); + obj = efl_constructor(efl_super(obj, MY_CLASS)); sd->on_create = EINA_TRUE; sd->window = efl_provider_find(efl_parent_get(obj), EFL_UI_WIN_CLASS); @@ -5642,8 +5644,6 @@ _efl_ui_widget_efl_object_constructor(Eo *obj, Elm_Widget_Smart_Data *sd EINA_UN } _efl_ui_focus_event_redirector(obj, obj); - efl_canvas_group_clipped_set(obj, EINA_FALSE); - obj = efl_constructor(efl_super(obj, MY_CLASS)); efl_canvas_object_type_set(obj, MY_CLASS_NAME_LEGACY); evas_object_smart_callbacks_descriptions_set(obj, _smart_callbacks); -- 2.7.4