aboutsummaryrefslogtreecommitdiff
path: root/scene/gui/control.cpp
diff options
context:
space:
mode:
authorAndreas Haas2016-10-05 08:56:58 +0200
committerRémi Verschelde2016-10-09 17:39:39 +0200
commit0462bf01a261ccc4a871752928a6ebb51f27f926 (patch)
treee69018ffb82eb93c2760f757483c1bd2c4bedfee /scene/gui/control.cpp
parentcf427eeb7a19cb1a7cb657cd543f2d7366b3a29b (diff)
downloadgodot-0462bf01a261ccc4a871752928a6ebb51f27f926.tar.gz
godot-0462bf01a261ccc4a871752928a6ebb51f27f926.tar.zst
godot-0462bf01a261ccc4a871752928a6ebb51f27f926.zip
Diffstat (limited to 'scene/gui/control.cpp')
-rw-r--r--scene/gui/control.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp
index c08e10b9f..787311780 100644
--- a/scene/gui/control.cpp
+++ b/scene/gui/control.cpp
@@ -1688,11 +1688,11 @@ Control *Control::find_next_valid_focus() const {
if (next_child==this) // no next control->
return (get_focus_mode()==FOCUS_ALL)?next_child:NULL;
-
- if (next_child->get_focus_mode()==FOCUS_ALL)
- return next_child;
-
- from = next_child;
+ if (next_child) {
+ if (next_child->get_focus_mode()==FOCUS_ALL)
+ return next_child;
+ from = next_child;
+ } else break;
}
return NULL;