efl_page_transition_scroll: fix warning the dereference before null check 78/190478/1
authorBowon Ryu <bowon.ryu@samsung.com>
Tue, 2 Oct 2018 10:24:28 +0000 (19:24 +0900)
committerBowon Ryu <bowon.ryu@samsung.com>
Tue, 2 Oct 2018 10:44:09 +0000 (19:44 +0900)
Summary: if target is null, then terminate the function because it is not intended.

Test Plan: N/A

Reviewers: eunue

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7127

Change-Id: Ia7f78e5a8a5e246623afee94231cc128df88d965
Signed-off-by: Bowon Ryu <bowon.ryu@samsung.com>
src/lib/elementary/efl_page_transition_scroll.c

index ab93d7c..41b7033 100644 (file)
@@ -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,