1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +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

@@ -133,6 +133,8 @@ void EditorFolding::_fill_folds(const Node *p_root, const Node *p_node, Array &p
}
void EditorFolding::save_scene_folding(const Node *p_scene, const String &p_path) {
ERR_FAIL_NULL(p_scene);
FileAccessRef file_check = FileAccess::create(FileAccess::ACCESS_RESOURCES);
if (!file_check->file_exists(p_path)) //This can happen when creating scene from FilesystemDock. It has path, but no file.
return;