summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2017-05-17 11:52:21 -0400
committerJesse Plamondon-Willard <github@jplamondonw.com>2017-05-17 11:52:21 -0400
commit6ce07be2fa1105e575b8f2bf263492ee9d411fcb (patch)
treefeb7b00a2997dc30dcfe3ff043496d204d084132 /src
parentd5ea812d7c82eac88b88c8f41756972a5322add6 (diff)
downloadSMAPI-6ce07be2fa1105e575b8f2bf263492ee9d411fcb.tar.gz
SMAPI-6ce07be2fa1105e575b8f2bf263492ee9d411fcb.tar.bz2
SMAPI-6ce07be2fa1105e575b8f2bf263492ee9d411fcb.zip
fix crash in unreleased code when loading a save that hasn't visited the mines yet
Diffstat (limited to 'src')
-rw-r--r--src/StardewModdingAPI/Framework/SGame.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/StardewModdingAPI/Framework/SGame.cs b/src/StardewModdingAPI/Framework/SGame.cs
index b281ef30..7f08e7b9 100644
--- a/src/StardewModdingAPI/Framework/SGame.cs
+++ b/src/StardewModdingAPI/Framework/SGame.cs
@@ -512,7 +512,7 @@ namespace StardewModdingAPI.Framework
this.PreviousDay = Game1.dayOfMonth;
this.PreviousSeason = Game1.currentSeason;
this.PreviousYear = Game1.year;
- this.PreviousMineLevel = Game1.mine.mineLevel;
+ this.PreviousMineLevel = Game1.mine?.mineLevel ?? 0;
this.PreviousSaveID = Game1.uniqueIDForThisGame;
}