diff options
| author | Andreas Haas | 2016-10-05 08:56:58 +0200 |
|---|---|---|
| committer | Andreas Haas | 2016-10-05 08:56:58 +0200 |
| commit | 8dd026e4f91f802719315fb6b5a45e36723d3adc (patch) | |
| tree | e5a8b7cf18e425ef4faad99b37e920ebe40b0a2e /scene/gui/control.cpp | |
| parent | 1f9e16119f2b17fa507bdee8529459ed91f27b8c (diff) | |
| download | godot-8dd026e4f91f802719315fb6b5a45e36723d3adc.tar.gz godot-8dd026e4f91f802719315fb6b5a45e36723d3adc.tar.zst godot-8dd026e4f91f802719315fb6b5a45e36723d3adc.zip | |
Diffstat (limited to 'scene/gui/control.cpp')
| -rw-r--r-- | scene/gui/control.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index a5bee32a6..97f0db97c 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -1725,11 +1725,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; |
