From: JunsuChoi Date: Thu, 27 Sep 2018 02:13:36 +0000 (+0900) Subject: efl_ui_focus_manager: Add null check X-Git-Tag: submit/tizen/20180928.051038~56 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6403992a1fa2cb11d84dff31bc7e21c2acfc0554;p=platform%2Fupstream%2Fefl.git efl_ui_focus_manager: Add null check Summary: This commit add null check on _next and _request_subchild function. The value 'node' is can be null. Test Plan: N/A Reviewers: bu5hm4n, YOhoho, Hermet Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D7069 Change-Id: I9c12ebc17bd2e959a4fc388ad761ee7d171581fd --- diff --git a/src/lib/elementary/efl_ui_focus_manager_calc.c b/src/lib/elementary/efl_ui_focus_manager_calc.c index a366271..ee6840c 100644 --- a/src/lib/elementary/efl_ui_focus_manager_calc.c +++ b/src/lib/elementary/efl_ui_focus_manager_calc.c @@ -1111,6 +1111,7 @@ static Node* _next(Node *node) { Node *n; + if (!node) return NULL; //Case 1 we are having children //But only enter the children if it does NOT have a redirect manager @@ -1295,6 +1296,7 @@ _request_subchild(Node *node) { //important! if there are no children _next would return the parent of node which will exceed the limit of children of node Node *target = NULL; + if (!node) return target; if (node->tree.children) {