jackdanielz pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=d86007d7fc78d11d39ba5e8286289e76076715c5

commit d86007d7fc78d11d39ba5e8286289e76076715c5
Author: Daniel Zaoui <daniel.za...@samsung.com>
Date:   Mon Mar 21 14:33:19 2016 +0200

    Genlist: fix test ending
    
    The multi select data was freed as it was an api_data structure,
    resulting in a crash when trying to free an internal api_data pointer.
    
    @fix
---
 src/bin/test_genlist.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/bin/test_genlist.c b/src/bin/test_genlist.c
index 0c25669..4c69be2 100644
--- a/src/bin/test_genlist.c
+++ b/src/bin/test_genlist.c
@@ -3759,6 +3759,12 @@ _multi_select_frame_create(Evas_Object *bx, 
Genlist_Multi_Data *gd)
                                   _multi_select_changed_cb, gd);
 }
 
+static void
+_multi_data_free_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *event_info EINA_UNUSED)
+{
+   free(data);
+}
+
 void
 test_genlist_multi_select(void *data EINA_UNUSED,
                           Evas_Object *obj EINA_UNUSED,
@@ -3771,7 +3777,7 @@ test_genlist_multi_select(void *data EINA_UNUSED,
 
    win = elm_win_util_standard_add("genlist-multi-select", "Genlist Multi 
Select");
    elm_win_autodel_set(win, EINA_TRUE);
-   evas_object_event_callback_add(win, EVAS_CALLBACK_FREE, _cleanup_cb, gd);
+   evas_object_event_callback_add(win, EVAS_CALLBACK_FREE, 
_multi_data_free_cb, gd);
 
    bx = elm_box_add(win);
    evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);

-- 


Reply via email to