mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-05 23:07:42 -05:00
Make SceneTree not crash when receiving a notification without a root being set.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user