From 33e0cb398baacb16eda88b13bf8e6bc66e21ea0e Mon Sep 17 00:00:00 2001 From: JunsuChoi Date: Fri, 5 Oct 2018 16:56:09 +0900 Subject: [PATCH] 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 Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D7146 Change-Id: Idca2dd57900380b9952558926ed66c02701b7b39 --- src/lib/elementary/elm_genlist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/elementary/elm_genlist.c b/src/lib/elementary/elm_genlist.c index 809d9e6..d2f4455 100644 --- a/src/lib/elementary/elm_genlist.c +++ b/src/lib/elementary/elm_genlist.c @@ -7620,7 +7620,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; -- 2.7.4