fix crash when a mod manifest is corrupted

This commit is contained in:
Jesse Plamondon-Willard 2018-08-22 01:36:11 -04:00
parent 5374b216ca
commit d2b6a71aa4
2 changed files with 2 additions and 1 deletions

View File

@ -5,6 +5,7 @@
* Moved most SMAPI files into a `smapi-internal` subfolder.
* Moved save backups into a `save-backups` subfolder (instead of `Mods/SaveBackup/backups`). Note that previous backups will be deleted when you update.
* Fixed installer duplicating bundled mods if you moved them after the last install.
* Fixed crash when a mod manifest is corrupted.
* Updated compatibility list.
* For modders:

View File

@ -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)