diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-03-31 12:47:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-31 12:47:25 +0200 |
commit | 6b25c94bd62a92a82551bf0aa03343bc2b3c3c7b (patch) | |
tree | 970c09e9a15899ed0e236980a607a2cca5676bcd /editor | |
parent | 3096423ddc61c8422722d629da3671c628bf2864 (diff) | |
parent | 79f55fcded4f244cf632434f9c1f7cf7ccb0161a (diff) |
Merge pull request #47519 from AndreaCatania/AndreaCatania-patch-4
Fixes editor crash on closing
Diffstat (limited to 'editor')
-rw-r--r-- | editor/plugins/node_3d_editor_plugin.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp index fccc042a02..81c59fc0a9 100644 --- a/editor/plugins/node_3d_editor_plugin.cpp +++ b/editor/plugins/node_3d_editor_plugin.cpp @@ -4577,7 +4577,12 @@ void _update_all_gizmos(Node *p_node) { void Node3DEditor::update_all_gizmos(Node *p_node) { if (!p_node) { - p_node = SceneTree::get_singleton()->get_root(); + if (SceneTree::get_singleton()) { + p_node = SceneTree::get_singleton()->get_root(); + } else { + // No scene tree, so nothing to update. + return; + } } _update_all_gizmos(p_node); } |