efl_interface_scrollable: call constructor at first
authorMarcel Hollerbach <marcel@osg.samsung.com>
Tue, 27 Mar 2018 09:34:14 +0000 (11:34 +0200)
committerWonki Kim <wonki_.kim@samsung.com>
Tue, 10 Apr 2018 11:22:04 +0000 (20:22 +0900)
other calls could lead to a geometry_get call, which will crash if the
constructor of the canvas_object is not called yet.

src/lib/elementary/elm_interface_scrollable.c

index f5aeb0c..6593c5f 100644 (file)
@@ -5186,13 +5186,14 @@ _elm_interface_scrollable_efl_ui_widget_focus_manager_create(Eo *obj EINA_UNUSED
 EOLIAN static Efl_Object*
 _elm_interface_scrollable_efl_object_constructor(Eo *obj, Elm_Scrollable_Smart_Interface_Data *pd EINA_UNUSED)
 {
+   Eo *o = efl_constructor(efl_super(obj, MY_SCROLLABLE_INTERFACE));
    pd->manager = efl_ui_widget_focus_manager_create(obj, obj);
 
    efl_composite_attach(obj, pd->manager);
 
    _efl_ui_focus_manager_redirect_events_add(pd->manager, obj);
 
-   return efl_constructor(efl_super(obj, MY_SCROLLABLE_INTERFACE));
+   return o;
 }
 
 static Eina_Bool