From 8bcc399723229edad12dce2258e6f2e6c4188818 Mon Sep 17 00:00:00 2001 From: Joshua Navarro Date: Mon, 24 Dec 2018 15:07:51 -0800 Subject: [PATCH] Hotfix for errors on DarkerNight component --- GeneralMods/Revitalize/Framework/Environment/DarkerNight.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/GeneralMods/Revitalize/Framework/Environment/DarkerNight.cs b/GeneralMods/Revitalize/Framework/Environment/DarkerNight.cs index ea5739e2..f2075411 100644 --- a/GeneralMods/Revitalize/Framework/Environment/DarkerNight.cs +++ b/GeneralMods/Revitalize/Framework/Environment/DarkerNight.cs @@ -61,6 +61,8 @@ namespace Revitalize.Framework.Environment public static void SetDarkerColor() { if (Config.Enabled == false) return; + if (Game1.player == null) return; + if (Game1.player.currentLocation == null) return; if (Game1.player.currentLocation.IsOutdoors && Game1.timeOfDay >= Game1.getStartingToGetDarkTime()) { Game1.outdoorLight = CalculatedColor; @@ -74,7 +76,7 @@ namespace Revitalize.Framework.Environment { if (Config.Enabled == false) return; if (Game1.player == null) return; - + if (Game1.player.currentLocation == null) return; //Calculate original lighting. if (Game1.timeOfDay >= Game1.getTrulyDarkTime()) {