1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-02-20 12:33:14 +00:00

Fixed crash when loading backups

backup_paths can have more elements that backup_save_paths, which caused crashes if a backup file did not exist.
This commit is contained in:
OverloadedOrama 2020-09-05 19:13:43 +03:00
parent 9cfbfdb5c1
commit aa3637cc41

View file

@ -504,7 +504,8 @@ func reload_backup_file(project_paths : Array, backup_paths : Array) -> void:
for i in range(project_paths.size()):
# If project path is the same as backup save path -> the backup was untitled
open_pxo_file(backup_paths[i], project_paths[i] == backup_paths[i])
backup_save_paths[i] = backup_paths[i]
if backup_save_paths.size() == backup_paths.size():
backup_save_paths[i] = backup_paths[i]
if project_paths[i] != backup_paths[i]: # If the user has saved
current_save_paths[i] = project_paths[i]