mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Make SceneTree
not crash when receiving a notification without a root being set.
This commit is contained in:
parent
21fbf033f7
commit
45a0d2a90a
1 changed files with 4 additions and 0 deletions
|
@ -897,6 +897,10 @@ void SceneTree::_main_window_focus_in() {
|
|||
}
|
||||
|
||||
void SceneTree::_notification(int p_notification) {
|
||||
if (!get_root()) {
|
||||
return;
|
||||
}
|
||||
|
||||
switch (p_notification) {
|
||||
case NOTIFICATION_TRANSLATION_CHANGED: {
|
||||
get_root()->propagate_notification(p_notification);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue