summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/SCore.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-07-06 19:25:15 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-07-06 19:25:15 -0400
commit9c9552531f8f085cded6ed5158503e75b00be1ff (patch)
treeda1e4474f6d5e4a5738b19a6cc45a9a16b13addd /src/SMAPI/Framework/SCore.cs
parent4d9fd63d9e890a10029508c7d7e31dcc0b579db7 (diff)
downloadSMAPI-9c9552531f8f085cded6ed5158503e75b00be1ff.tar.gz
SMAPI-9c9552531f8f085cded6ed5158503e75b00be1ff.tar.bz2
SMAPI-9c9552531f8f085cded6ed5158503e75b00be1ff.zip
fix build warnings
Diffstat (limited to 'src/SMAPI/Framework/SCore.cs')
-rw-r--r--src/SMAPI/Framework/SCore.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/SMAPI/Framework/SCore.cs b/src/SMAPI/Framework/SCore.cs
index d9969d4d..46d65f6a 100644
--- a/src/SMAPI/Framework/SCore.cs
+++ b/src/SMAPI/Framework/SCore.cs
@@ -191,7 +191,7 @@ namespace StardewModdingAPI.Framework
string logPath = this.GetLogPath();
// init basics
- this.Settings = JsonConvert.DeserializeObject<SConfig>(File.ReadAllText(Constants.ApiConfigPath));
+ this.Settings = JsonConvert.DeserializeObject<SConfig>(File.ReadAllText(Constants.ApiConfigPath)) ?? throw new InvalidOperationException("The 'smapi-internal/config.json' file is missing or invalid. You can reinstall SMAPI to fix this.");
if (File.Exists(Constants.ApiUserConfigPath))
JsonConvert.PopulateObject(File.ReadAllText(Constants.ApiUserConfigPath), this.Settings);
if (developerMode.HasValue)