summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean Guyomarc'h <jean.guyomarch@gmail.com>2015-11-09 16:13:13 -0800
committerCedric BAIL <cedric@osg.samsung.com>2015-11-09 16:13:19 -0800
commit4421aee9d5aef3b670e5ab860d2a0a785c458486 (patch)
tree089911cc2ead01d2d9efe1eab9b36797b89032e2
parent4172fb14f3a0907905f1dc65456ef7a3b94c0611 (diff)
downloadelementary-4421aee9d5aef3b670e5ab860d2a0a785c458486.tar.gz
segment_control: fix variable affectation
Summary: When an Elm_Segment_Control object is created, the constructor calls the smart_add() behind the scenes. It then calls _update_list() which calls _position_items(), with the sd->obj unset (because it was set after calling super constructors). This led to a CRI() (and therefore to a backtrace) on the creation of each Elm_Segment_Control. @fix Test Plan: elementary_test Reviewers: stefan_schmidt, cedric, raster Differential Revision: https://phab.enlightenment.org/D3276 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
-rw-r--r--src/lib/elm_segment_control.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/elm_segment_control.c b/src/lib/elm_segment_control.c
index 169f32bfd..68d46dad8 100644
--- a/src/lib/elm_segment_control.c
+++ b/src/lib/elm_segment_control.c
@@ -605,8 +605,9 @@ _elm_segment_control_item_eo_base_constructor(Eo *obj, Elm_Segment_Control_Item_
}
EOLIAN static void
-_elm_segment_control_evas_object_smart_add(Eo *obj, Elm_Segment_Control_Data *_pd EINA_UNUSED)
+_elm_segment_control_evas_object_smart_add(Eo *obj, Elm_Segment_Control_Data *sd)
{
+ sd->obj = obj;
eo_do_super(obj, MY_CLASS, evas_obj_smart_add());
elm_widget_sub_object_parent_add(obj);
@@ -698,10 +699,9 @@ elm_segment_control_add(Evas_Object *parent)
}
EOLIAN static Eo *
-_elm_segment_control_eo_base_constructor(Eo *obj, Elm_Segment_Control_Data *sd)
+_elm_segment_control_eo_base_constructor(Eo *obj, Elm_Segment_Control_Data *sd EINA_UNUSED)
{
obj = eo_do_super_ret(obj, MY_CLASS, obj, eo_constructor());
- sd->obj = obj;
eo_do(obj,
evas_obj_type_set(MY_CLASS_NAME_LEGACY),