Fixes crash when deleting corrupted games

This commit is contained in:
Riley Testut 2016-12-11 18:46:58 -08:00
parent 3311c04a07
commit 73af189100

View File

@ -57,6 +57,9 @@ public class SaveState: _SaveState, SaveStateProtocol
{
super.prepareForDeletion()
// In rare cases, game may actually be nil if game is corrupted, so we ensure it is non-nil first
guard self.game != nil else { return }
guard FileManager.default.fileExists(atPath: self.fileURL.path) else { return }
do