diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-09-28 11:26:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-28 11:26:37 +0200 |
commit | b0f0e0e2fc95743adccf76ce82696be5b9553536 (patch) | |
tree | 104b9aa1e0b19018aa694c59a27a37e12a9e5630 | |
parent | 3481c47e7148fa31151c95d0adf198a370358351 (diff) | |
parent | faf0a49cbf0e8e8979c01d8b7915a3a5d68f4200 (diff) |
Merge pull request #32409 from bojidar-bg/32334-null-ptr-esgp
Fix crash in ~EditorSpatialGizmoPlugin when generating documentation data
-rw-r--r-- | editor/plugins/spatial_editor_plugin.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp index ba40fc5612..1e083eff52 100644 --- a/editor/plugins/spatial_editor_plugin.cpp +++ b/editor/plugins/spatial_editor_plugin.cpp @@ -4062,7 +4062,6 @@ void _update_all_gizmos(Node *p_node) { void SpatialEditor::update_all_gizmos(Node *p_node) { if (!p_node) { - if (!SceneTree::get_singleton()) return; p_node = SceneTree::get_singleton()->get_root(); } _update_all_gizmos(p_node); @@ -6269,5 +6268,7 @@ EditorSpatialGizmoPlugin::~EditorSpatialGizmoPlugin() { current_gizmos[i]->set_plugin(NULL); current_gizmos[i]->get_spatial_node()->set_gizmo(NULL); } - SpatialEditor::get_singleton()->update_all_gizmos(); + if (SpatialEditor::get_singleton()) { + SpatialEditor::get_singleton()->update_all_gizmos(); + } } |