Skip recovery saving if there's only 1 node

This commit is contained in:
Rodz Labs 2023-01-22 08:54:20 +01:00
parent e8da8ac9ec
commit bd5ba8a14c
1 changed files with 3 additions and 0 deletions

View File

@ -388,6 +388,9 @@ func clear_view() -> void:
func crash_recovery_save() -> void:
if !need_save_crash_recovery:
return
# don't save if there's only a single node
if top_generator.get_child_count() < 2:
return
if save_crash_recovery_path == "":
var dir : Directory = Directory.new()
dir.make_dir_recursive("user://unsaved_projects")