elm_genlist: prevent null pointer access

Summary: it->item->block can be null. so add null check.

Test Plan: elementary_test -to "genlist show/bring"

Reviewers: SanghyeonLee, woohyun

Subscribers: woohyun, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7146
This commit is contained in:
junsu choi 2018-10-05 17:13:54 +09:00 committed by WooHyun Jung
parent 103ba3668e
commit 01e6f80e57
1 changed files with 1 additions and 1 deletions

View File

@ -7195,7 +7195,7 @@ _elm_genlist_item_coordinates_calc(Elm_Gen_Item *it,
if ((it->item->queued) || (!it->item->mincalcd) || (sd->queue))
deferred_show = EINA_TRUE;
}
if (it->item->block->w < 1) deferred_show = EINA_TRUE;
if ((it->item->block) && (it->item->block->w < 1)) deferred_show = EINA_TRUE;
evas_object_geometry_get(sd->pan_obj, NULL, NULL, w, h);
if (*w < 1 || *h < 1) deferred_show = EINA_TRUE;