summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Michael <cp.michael@samsung.com>2019-03-14 07:22:44 -0400
committerChristopher Michael <cp.michael@samsung.com>2019-03-14 07:22:44 -0400
commit27095e859a26b0c938d894463a180e6a1f6e0568 (patch)
treec63b71a7265d9810403c9c965edb465161d87f5a
parent881b72f40d798db636e702287d762c5e2006ead2 (diff)
efl_ui_grid: Fix dereferencing null pointer
Summary: Coverity reports EFL_UI_GRID_ITEM_DATA_GET can return NULL (checked 273 out of 281 times). As such, we should verify that 'id' is not NULL here before trying to dereference it. Fixes Coverity CID1397000 @fix Depends on D8318 Reviewers: raster, cedric, q66, zmike, bu5hm4n, stefan Reviewed By: cedric Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8319
-rw-r--r--src/lib/elementary/efl_ui_grid.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lib/elementary/efl_ui_grid.c b/src/lib/elementary/efl_ui_grid.c
index 58cacdd6f3..9c8b597e0e 100644
--- a/src/lib/elementary/efl_ui_grid.c
+++ b/src/lib/elementary/efl_ui_grid.c
@@ -167,6 +167,7 @@ _reposition(Eo *obj EINA_UNUSED, Efl_Ui_Grid_Data *pd, Eina_Position2D pan)
167 EINA_LIST_FOREACH(pd->items, l, item) 167 EINA_LIST_FOREACH(pd->items, l, item)
168 { 168 {
169 EFL_UI_GRID_ITEM_DATA_GET(item, id); 169 EFL_UI_GRID_ITEM_DATA_GET(item, id);
170 if (!id) continue;
170 171
171 ipos.x = id->geo.x - pan.x; 172 ipos.x = id->geo.x - pan.x;
172 ipos.y = id->geo.y - pan.y; 173 ipos.y = id->geo.y - pan.y;