list: fix crash while setting nearest item in viewport
authorAmitesh Singh <amitesh.sh@samsung.com>
Sat, 15 Aug 2015 17:16:51 +0000 (22:46 +0530)
committerAmitesh Singh <amitesh.sh@samsung.com>
Sat, 15 Aug 2015 17:25:46 +0000 (22:55 +0530)
commit40dad8578e64b51a09b914afe2bdea72f16965b9
tree91c61ff3ae2e6b1301f3ff440fbd2bdb494e000e
parent0891ac5cfc2710d0c890340515aa5dbbe1f20466
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