tasn pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=46ac246a3195721bd207300c5db14e7aac593686

commit 46ac246a3195721bd207300c5db14e7aac593686
Author: Tom Hacohen <t...@stosb.com>
Date:   Thu Apr 28 15:54:34 2016 +0100

    Elm combobox: composite attach objects after reparenting.
    
    This fixes the segfault reported by Jack.
    
    The problem was that the object was being reparented and thus
    removed from the composition and never added back.
---
 src/lib/elementary/elc_combobox.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/lib/elementary/elc_combobox.c 
b/src/lib/elementary/elc_combobox.c
index 792017e..c347b1e 100644
--- a/src/lib/elementary/elc_combobox.c
+++ b/src/lib/elementary/elc_combobox.c
@@ -380,7 +380,6 @@ _elm_combobox_multiple_selection_set(Eo *obj, 
Elm_Combobox_Data *pd,
         elm_object_part_text_set(pd->mbe, "guide", 
elm_object_part_text_get(pd->entry,
                                  "guide"));
         evas_object_hide(pd->entry);
-        eo_composite_attach(obj, pd->mbe);
 
         scr = elm_scroller_add(obj);
         elm_scroller_bounce_set(scr, EINA_FALSE, EINA_TRUE);
@@ -391,6 +390,8 @@ _elm_combobox_multiple_selection_set(Eo *obj, 
Elm_Combobox_Data *pd,
         elm_object_content_set(scr, pd->mbe);
         elm_object_part_content_set(obj, "elm.swallow.content", scr);
         elm_widget_can_focus_set(pd->genlist, EINA_FALSE);
+
+        eo_composite_attach(obj, pd->mbe);
      }
    else
      {
@@ -402,6 +403,8 @@ _elm_combobox_multiple_selection_set(Eo *obj, 
Elm_Combobox_Data *pd,
         elm_widget_can_focus_set(pd->genlist, EINA_TRUE);
         elm_genlist_item_bring_in(pd->item, ELM_GENLIST_ITEM_SCROLLTO_NONE);
         evas_object_hide(scr);
+
+        eo_composite_attach(obj, pd->entry);
      }
 }
 
@@ -481,10 +484,11 @@ _elm_combobox_eo_base_constructor(Eo *obj, 
Elm_Combobox_Data *sd)
    eo_event_callback_array_add(entry, entry_callbacks(), obj);
    evas_object_show(entry);
 
+   elm_object_part_content_set(obj, "elm.swallow.content", entry);
+
    eo_composite_attach(obj, gl);
    eo_composite_attach(obj, entry);
 
-   elm_object_part_content_set(obj, "elm.swallow.content", entry);
    return obj;
 }
 

-- 


Reply via email to