elm_genlist: prevent null pointer access

Summary: found by coverity

Reviewers: Hermet

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7108
This commit is contained in:
Yeongjong Lee 2018-09-27 14:08:39 +09:00 committed by Hermet Park
parent 5e388350f0
commit 39de8cdc75
1 changed files with 5 additions and 2 deletions

View File

@ -6637,8 +6637,11 @@ _elm_genlist_item_sorted_insert(Eo *obj, Elm_Genlist_Data *sd, const Elm_Genlist
if (rel->item->items)
{
Eina_List *ll = _list_last_recursive(rel->item->items);
eo_rel = ll->data;
rel = efl_data_scope_get(eo_rel, ELM_GENLIST_ITEM_CLASS);
if (ll)
{
eo_rel = ll->data;
rel = efl_data_scope_get(eo_rel, ELM_GENLIST_ITEM_CLASS);
}
}
sd->items = eina_inlist_append_relative
(sd->items, EINA_INLIST_GET(it), EINA_INLIST_GET(rel));