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)
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_
605} 605}
606 606
607EOLIAN static void 607EOLIAN static void
608_elm_segment_control_evas_object_smart_add(Eo *obj, Elm_Segment_Control_Data *_pd EINA_UNUSED) 608_elm_segment_control_evas_object_smart_add(Eo *obj, Elm_Segment_Control_Data *sd)
609{ 609{
610 sd->obj = obj;
610 eo_do_super(obj, MY_CLASS, evas_obj_smart_add()); 611 eo_do_super(obj, MY_CLASS, evas_obj_smart_add());
611 elm_widget_sub_object_parent_add(obj); 612 elm_widget_sub_object_parent_add(obj);
612 613
@@ -698,10 +699,9 @@ elm_segment_control_add(Evas_Object *parent)
698} 699}
699 700
700EOLIAN static Eo * 701EOLIAN static Eo *
701_elm_segment_control_eo_base_constructor(Eo *obj, Elm_Segment_Control_Data *sd) 702_elm_segment_control_eo_base_constructor(Eo *obj, Elm_Segment_Control_Data *sd EINA_UNUSED)
702{ 703{
703 obj = eo_do_super_ret(obj, MY_CLASS, obj, eo_constructor()); 704 obj = eo_do_super_ret(obj, MY_CLASS, obj, eo_constructor());
704 sd->obj = obj;
705 705
706 eo_do(obj, 706 eo_do(obj,
707 evas_obj_type_set(MY_CLASS_NAME_LEGACY), 707 evas_obj_type_set(MY_CLASS_NAME_LEGACY),