From 10e00e3ecc79372fdba0a420fcf6e3c97cbad8e8 Mon Sep 17 00:00:00 2001 From: Bowon Ryu Date: Tue, 2 Oct 2018 19:47:22 +0900 Subject: efl_page_transition_scroll: fix warning the dereference before null check Summary: if target is null, then terminate the function because it is not intended. Test Plan: N/A Reviewers: eunue Reviewed By: eunue Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D7127 --- src/lib/elementary/efl_page_transition_scroll.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/elementary/efl_page_transition_scroll.c b/src/lib/elementary/efl_page_transition_scroll.c index ab93d7cb12..41b70336c3 100644 --- a/src/lib/elementary/efl_page_transition_scroll.c +++ b/src/lib/elementary/efl_page_transition_scroll.c @@ -405,6 +405,8 @@ _efl_page_transition_scroll_curr_page_change(Eo *obj EINA_UNUSED, } pi->pos = pi->id - (pd->side_page_num + 1); + if (!target) return; + EINA_RECTANGLE_SET(&pi->temp, target->geometry.x, target->geometry.y, -- cgit v1.2.1