fix for crash in _sort_items function due to sorting NULL pointers 76/202276/3
authorRadoslaw Cybulski <r.cybulski@partner.samsung.com>
Tue, 26 Mar 2019 13:04:16 +0000 (14:04 +0100)
committerLukasz Oleksak <l.oleksak@samsung.com>
Wed, 27 Mar 2019 15:32:00 +0000 (15:32 +0000)
Fixes issue in TDAF-835 on fridges. Calling elm_gengrid_clear would
cause crash due to sorting atspi elements. Comparision function would
get two NULLs and trying to derefence them would issue a crash

Change-Id: Ib1771503fcc467c26f3c550188ea65eaeaf495df

src/lib/elementary/elm_gengrid.c

index 2789fe0..fb73dc6 100644 (file)
@@ -5197,6 +5197,9 @@ _internal_elm_gengrid_clear(Evas_Object *obj,
 
    ELM_GENGRID_DATA_GET(obj, sd);
    if (!sd->items) return;
+   
+   eina_list_free(sd->atspi_children);
+   sd->atspi_children = NULL;
 
    if (!standby) sd->generation++;