Skip to content

Commit

Permalink
Fixed error while loading mod saves, if save file does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
Athlon007 committed May 26, 2021
1 parent f17581d commit 6e03374
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions MSCLoader/MSCLoader/ModSave.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ public static T Load<T>(string fileName, string encryptionKey = "") where T : cl
{
string path = Path.Combine(Application.persistentDataPath, $"{fileName}.xml");

if (!File.Exists(path)) return new T();

StreamReader input = new StreamReader(path);
MemoryStream memoryInput = null;

Expand Down

0 comments on commit 6e03374

Please sign in to comment.