summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2017-07-03 14:12:15 -0400
committerJesse Plamondon-Willard <github@jplamondonw.com>2017-07-03 14:12:15 -0400
commit0f05e7bd54823750d6ccd153ec929e831b51f426 (patch)
tree0a7686749562c840e77606ed46d8be8adfb37a27
parent697155c8a239a48ecaaaca0490584b78f3e3c26e (diff)
downloadSMAPI-0f05e7bd54823750d6ccd153ec929e831b51f426.tar.gz
SMAPI-0f05e7bd54823750d6ccd153ec929e831b51f426.tar.bz2
SMAPI-0f05e7bd54823750d6ccd153ec929e831b51f426.zip
fix error when mods have no manifest
-rw-r--r--src/StardewModdingAPI/Program.cs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/StardewModdingAPI/Program.cs b/src/StardewModdingAPI/Program.cs
index 10fb5a82..ed1fe2e7 100644
--- a/src/StardewModdingAPI/Program.cs
+++ b/src/StardewModdingAPI/Program.cs
@@ -606,7 +606,7 @@ namespace StardewModdingAPI
{
// get basic info
IManifest manifest = metadata.Manifest;
- string assemblyPath = metadata.Manifest.EntryDll != null
+ string assemblyPath = metadata.Manifest?.EntryDll != null
? Path.Combine(metadata.DirectoryPath, metadata.Manifest.EntryDll)
: null;
this.Monitor.Log(assemblyPath != null
@@ -711,7 +711,10 @@ namespace StardewModdingAPI
IModMetadata mod = pair.Key;
string reason = pair.Value;
- this.Monitor.Log($" {mod.DisplayName} {mod.Manifest.Version} because {reason}", LogLevel.Error);
+ if (mod.Manifest?.Version != null)
+ this.Monitor.Log($" {mod.DisplayName} {mod.Manifest.Version} because {reason}", LogLevel.Error);
+ else
+ this.Monitor.Log($" {mod.DisplayName} because {reason}", LogLevel.Error);
}
this.Monitor.Newline();
}