summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2015-10-14 10:52:03 -0400
committerNicolas Aguirre <aguirre.nicolas@gmail.com>2015-11-12 10:15:03 +0100
commitb34bf3d257e2e3af7d5049e5e278c0c3473b32fc (patch)
treeb1b554a860ee4e05a1ba5c86c3ba0b114de3a65c
parent9559b92ea97338880cc0de2ad069e7647a1b00d5 (diff)
elementary: Fix genlist example to not free data until After it has
been removed from the list @fix CID1327342 Signed-off-by: Chris Michael <cp.michael@samsung.com>
-rw-r--r--src/examples/genlist_example_05.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/examples/genlist_example_05.c b/src/examples/genlist_example_05.c
index f77762e70..d36503cbc 100644
--- a/src/examples/genlist_example_05.c
+++ b/src/examples/genlist_example_05.c
@@ -223,12 +223,14 @@ _del_item_cb(void *data, Evas_Object *o, void *event_info)
223 elm_genlist_item_subitems_clear(glit); 223 elm_genlist_item_subitems_clear(glit);
224 elm_object_item_del(glit); 224 elm_object_item_del(glit);
225 225
226 _clear_list(d); 226 if (glit_parent)
227 {
228 pdata = elm_object_item_data_get(glit_parent);
229 pdata->children = eina_list_remove(pdata->children, d);
230 }
227 231
228 if (!glit_parent) return; 232 _clear_list(d);
229 233
230 pdata = elm_object_item_data_get(glit_parent);
231 pdata->children = eina_list_remove(pdata->children, d);
232 elm_genlist_item_update(glit_parent); 234 elm_genlist_item_update(glit_parent);
233} 235}
234 236