Merge pull request #62763 from timothyqiu/nullify

Fix heap-use-after-free when closing a scene with its builtin script open
This commit is contained in:
Rémi Verschelde 2022-07-06 07:52:29 +02:00 committed by GitHub
commit 8dfdb71f8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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) {