elm_list: perform a null check before accessing its member

Summary:
In inline function _elm_list_item_free, null check is performed
after accessing its member.

@fix

Reviewers: cedric, Hermet

Reviewed By: Hermet

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D3955
This commit is contained in:
Jee-Yong Um 2016-05-18 17:56:12 +09:00 committed by Hermet Park
parent 1f4af666e8
commit 80c42bc3a5
1 changed files with 5 additions and 1 deletions

View File

@ -91,8 +91,12 @@ _is_no_select(Elm_List_Item_Data *it)
static inline void
_elm_list_item_free(Elm_List_Item_Data *it)
{
Elm_Object_Item *eo_it;
if (!it) return;
ELM_LIST_DATA_GET_FROM_ITEM(it, sd);
Elm_Object_Item *eo_it = it?EO_OBJ(it):NULL;
eo_it = EO_OBJ(it);
if (sd->focused_item == eo_it)
sd->focused_item = NULL;