diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-11-12 14:25:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-12 14:25:44 +0100 |
commit | 5bdb4827daca745e3c02c23b2214ff065ea83089 (patch) | |
tree | 5fcc512c60eeb04c6d12dde2158e3aff89f0f501 | |
parent | 750e61c1401412077969cce424a9687fa063a1d4 (diff) | |
parent | 57b12c10ab01ee9d13c1be67f5b557b787e3279f (diff) |
Merge pull request #33571 from KoBeWi/new_crash
Prevent crash when scene has path, but no file
-rw-r--r-- | editor/editor_folding.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/editor/editor_folding.cpp b/editor/editor_folding.cpp index 96653fec70..9f13049a6b 100644 --- a/editor/editor_folding.cpp +++ b/editor/editor_folding.cpp @@ -135,6 +135,10 @@ 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) { + 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; + Ref<ConfigFile> config; config.instance(); |