forked from enlightenment/efl
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
This commit is contained in:
parent
0098aa6670
commit
2f9c23a87e
|
@ -1111,6 +1111,7 @@ static Node*
|
||||||
_next(Node *node)
|
_next(Node *node)
|
||||||
{
|
{
|
||||||
Node *n;
|
Node *n;
|
||||||
|
if (!node) return NULL;
|
||||||
|
|
||||||
//Case 1 we are having children
|
//Case 1 we are having children
|
||||||
//But only enter the children if it does NOT have a redirect manager
|
//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
|
//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;
|
Node *target = NULL;
|
||||||
|
if (!node) return target;
|
||||||
|
|
||||||
if (node->tree.children)
|
if (node->tree.children)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue