diff --git a/editor/editor_data.cpp b/editor/editor_data.cpp index 64c234a07c6..e9e3320a3d8 100644 --- a/editor/editor_data.cpp +++ b/editor/editor_data.cpp @@ -534,6 +534,7 @@ void EditorData::remove_scene(int p_idx) { } memdelete(edited_scene[p_idx].root); + edited_scene.write[p_idx].root = nullptr; } if (current_edited_scene > p_idx) {