summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmitesh Singh <amitesh.sh@samsung.com>2015-08-15 22:46:51 +0530
committerStefan Schmidt <stefan@datenfreihafen.org>2015-08-17 11:07:45 +0200
commit91db102d209437c68d4af336da0d0c3de7291dd7 (patch)
tree674ac17305172a34603b2ad3d5cdd135ea001e24
parentb70edf3e6995b2a1bb5db88b3d7df24725704dde (diff)
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
-rw-r--r--src/lib/elm_list.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/lib/elm_list.c b/src/lib/elm_list.c
index 1cd1560ba..604d3d730 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)
1233 if (ELM_RECTS_INCLUDE(vx, vy, vw, vh, cx, cy, cw, ch) && 1233 if (ELM_RECTS_INCLUDE(vx, vy, vw, vh, cx, cy, cw, ch) &&
1234 !elm_object_item_disabled_get(EO_OBJ(item))) 1234 !elm_object_item_disabled_get(EO_OBJ(item)))
1235 { 1235 {
1236 eina_list_free(item_list);
1237 return item; 1236 return item;
1238 } 1237 }
1239 } 1238 }
@@ -1248,12 +1247,10 @@ _elm_list_nearest_visible_item_get(Evas_Object *obj, Elm_List_Item_Data *it)
1248 if (ELM_RECTS_INCLUDE(vx, vy, vw, vh, cx, cy, cw, ch) && 1247 if (ELM_RECTS_INCLUDE(vx, vy, vw, vh, cx, cy, cw, ch) &&
1249 !elm_object_item_disabled_get(EO_OBJ(item))) 1248 !elm_object_item_disabled_get(EO_OBJ(item)))
1250 { 1249 {
1251 eina_list_free(item_list);
1252 return item; 1250 return item;
1253 } 1251 }
1254 } 1252 }
1255 } 1253 }
1256 eina_list_free(item_list);
1257 1254
1258 return it; 1255 return it;
1259} 1256}