diff --git a/editor/editor_data.cpp b/editor/editor_data.cpp index 915a3c69b41..6bd6c71246e 100644 --- a/editor/editor_data.cpp +++ b/editor/editor_data.cpp @@ -535,6 +535,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) {