summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2018-08-22 01:36:11 -0400
committerJesse Plamondon-Willard <github@jplamondonw.com>2018-08-22 01:36:11 -0400
commitd2b6a71aa4cc3383d55350e346e27c1ab2ff134b (patch)
tree5f1e6001c32258cfdd8a3463660298151ebb037b /src
parent5374b216ca62959db384ed243ac51e6209bc2abc (diff)
downloadSMAPI-d2b6a71aa4cc3383d55350e346e27c1ab2ff134b.tar.gz
SMAPI-d2b6a71aa4cc3383d55350e346e27c1ab2ff134b.tar.bz2
SMAPI-d2b6a71aa4cc3383d55350e346e27c1ab2ff134b.zip
fix crash when a mod manifest is corrupted
Diffstat (limited to 'src')
-rw-r--r--src/StardewModdingAPI.Toolkit/Framework/ModScanning/ModScanner.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/StardewModdingAPI.Toolkit/Framework/ModScanning/ModScanner.cs b/src/StardewModdingAPI.Toolkit/Framework/ModScanning/ModScanner.cs
index 71dc0cb3..7512d5cb 100644
--- a/src/StardewModdingAPI.Toolkit/Framework/ModScanning/ModScanner.cs
+++ b/src/StardewModdingAPI.Toolkit/Framework/ModScanning/ModScanner.cs
@@ -64,7 +64,7 @@ namespace StardewModdingAPI.Toolkit.Framework.ModScanning
{
try
{
- if (!this.JsonHelper.ReadJsonFileIfExists<Manifest>(manifestFile.FullName, out manifest))
+ if (!this.JsonHelper.ReadJsonFileIfExists<Manifest>(manifestFile.FullName, out manifest) || manifest == null)
manifestError = "its manifest is invalid.";
}
catch (SParseException ex)