Merge pull request #33571 from KoBeWi/new_crash
Prevent crash when scene has path, but no file
This commit is contained in:
commit
5bdb4827da
1 changed files with 4 additions and 0 deletions
|
@ -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) {
|
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;
|
Ref<ConfigFile> config;
|
||||||
config.instance();
|
config.instance();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue