From 6ce07be2fa1105e575b8f2bf263492ee9d411fcb Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Wed, 17 May 2017 11:52:21 -0400 Subject: fix crash in unreleased code when loading a save that hasn't visited the mines yet --- src/StardewModdingAPI/Framework/SGame.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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; } -- cgit