You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-09 12:50:35 +00:00
Fixes editor crash on closing
Fixes editor crash when the gizmo is destroyed and the `SceneTree` is already freed.
This commit is contained in:
@@ -4503,7 +4503,12 @@ void _update_all_gizmos(Node *p_node) {
|
|||||||
|
|
||||||
void Node3DEditor::update_all_gizmos(Node *p_node) {
|
void Node3DEditor::update_all_gizmos(Node *p_node) {
|
||||||
if (!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);
|
_update_all_gizmos(p_node);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user