ami pushed a commit to branch elementary-1.15.

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

commit d8d78a708769773d02f96222d3e772edbe536942
Author: Amitesh Singh <amitesh...@samsung.com>
Date:   Sat Aug 15 22:46:51 2015 +0530

    list: fix crash while setting nearest item in viewport
    
    This is an example of classic code copy and paste mistake.
    Probably inspired from similar code in genlist/gengrid.
    We were actually deleting the other items (except selected one) in
    viewport in _elm_list_nearest_visible_item_get() which results into crash
    while deleting the list object.
    
    @fix
    
    Resolves: T2662
---
 src/lib/elm_list.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/src/lib/elm_list.c b/src/lib/elm_list.c
index 7c9d086..dc325da 100644
--- a/src/lib/elm_list.c
+++ b/src/lib/elm_list.c
@@ -1233,7 +1233,6 @@ _elm_list_nearest_visible_item_get(Evas_Object *obj, 
Elm_List_Item_Data *it)
              if (ELM_RECTS_INCLUDE(vx, vy, vw, vh, cx, cy, cw, ch) &&
                  !elm_object_item_disabled_get(EO_OBJ(item)))
                {
-                  eina_list_free(item_list);
                   return item;
                }
           }
@@ -1248,12 +1247,10 @@ _elm_list_nearest_visible_item_get(Evas_Object *obj, 
Elm_List_Item_Data *it)
              if (ELM_RECTS_INCLUDE(vx, vy, vw, vh, cx, cy, cw, ch) &&
                  !elm_object_item_disabled_get(EO_OBJ(item)))
                {
-                  eina_list_free(item_list);
                   return item;
                }
           }
      }
-   eina_list_free(item_list);
 
    return it;
 }

-- 


Reply via email to