diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-05-17 11:52:21 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-05-17 11:52:21 -0400 |
commit | 6ce07be2fa1105e575b8f2bf263492ee9d411fcb (patch) | |
tree | feb7b00a2997dc30dcfe3ff043496d204d084132 /src/StardewModdingAPI/Framework | |
parent | d5ea812d7c82eac88b88c8f41756972a5322add6 (diff) | |
download | SMAPI-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/StardewModdingAPI/Framework')
-rw-r--r-- | src/StardewModdingAPI/Framework/SGame.cs | 2 |
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; } |