Merge pull request #116848 from billuo/bugfix/issue-116788-crash

Fix `reload_scene_from_path` may crash
This commit is contained in:
Thaddeus Crews 2026-03-04 11:20:41 -06:00
commit bed242666a
No known key found for this signature in database
GPG key ID: 8C6E5FEB5FC03CCC
4 changed files with 12 additions and 13 deletions

View file

@ -4480,7 +4480,8 @@ bool EditorNode::is_addon_plugin_enabled(const String &p_addon) const {
void EditorNode::_remove_edited_scene(bool p_change_tab) {
// When scene gets closed no node is edited anymore, so make sure the editors are notified before nodes are freed.
hide_unused_editors(SceneTreeDock::get_singleton());
SceneTreeDock::get_singleton()->clear_previous_node_selection();
editor_selection->clear();
editor_selection->update(false);
int new_index = editor_data.get_edited_scene();
int old_index = new_index;