index: Avoid SIGSEV in elm_index_item_sorted_insert

Summary:
Avoid SIGSEV in elm_index_item_sorted_insert when cmp_data_func returns >=0
After deleting eo_item and making it NULL in above case, view(it) is created which resulted in crash.

Test Plan: elementary_test -to 'index 2'

Reviewers: singh.amitesh, jpeg, cedric, raster, Hermet

Reviewed By: Hermet

Subscribers: Hermet

Differential Revision: https://phab.enlightenment.org/D3956
This commit is contained in:
Yeshwanth Reddivari 2016-05-18 18:31:48 +09:00 committed by Hermet Park
parent 45bc4f30eb
commit 5f87f5f673
1 changed files with 1 additions and 1 deletions

View File

@ -1490,7 +1490,7 @@ _elm_index_item_sorted_insert(Eo *obj, Elm_Index_Data *sd, const char *letter, E
if (cmp_data_func(WIDGET_ITEM_DATA_GET(eo_p_it), item_data) >= 0)
WIDGET_ITEM_DATA_SET(eo_p_it, item_data);
elm_wdg_item_del(eo_item);
eo_item = NULL;
return NULL;
}
}
ELM_INDEX_ITEM_DATA_GET(eo_item, it);