You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-11 13:10:58 +00:00
Prevent crash on focus change when no valid next control has been found.
Fixes the crash discussed in #6714.
This commit is contained in:
@@ -1725,11 +1725,11 @@ Control *Control::find_next_valid_focus() const {
|
|||||||
|
|
||||||
if (next_child==this) // no next control->
|
if (next_child==this) // no next control->
|
||||||
return (get_focus_mode()==FOCUS_ALL)?next_child:NULL;
|
return (get_focus_mode()==FOCUS_ALL)?next_child:NULL;
|
||||||
|
if (next_child) {
|
||||||
if (next_child->get_focus_mode()==FOCUS_ALL)
|
if (next_child->get_focus_mode()==FOCUS_ALL)
|
||||||
return next_child;
|
return next_child;
|
||||||
|
from = next_child;
|
||||||
from = next_child;
|
} else break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|||||||
Reference in New Issue
Block a user