1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

Fix EditorFolding crash when switching scenes

This commit is contained in:
Thakee Nathees
2020-03-05 16:12:41 +05:30
parent f05bbe6932
commit 3275e8488b
2 changed files with 3 additions and 1 deletions

View File

@@ -3279,7 +3279,7 @@ void EditorNode::_clear_undo_history() {
void EditorNode::set_current_scene(int p_idx) {
//Save the folding in case the scene gets reloaded.
if (editor_data.get_scene_path(p_idx) != "")
if (editor_data.get_scene_path(p_idx) != "" && editor_data.get_edited_scene_root(p_idx))
editor_folding.save_scene_folding(editor_data.get_edited_scene_root(p_idx), editor_data.get_scene_path(p_idx));
if (editor_data.check_and_update_scene(p_idx)) {