summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2017-05-19 23:49:59 -0400
committerJesse Plamondon-Willard <github@jplamondonw.com>2017-05-19 23:49:59 -0400
commit2781c27786739abc6f8f948e3068b0c997296524 (patch)
treefac8d997d3ee2ed0668b4d344e3971b640a7cb4b /src
parent16281fb58944e7e829b184b014e27822c91c9f43 (diff)
downloadSMAPI-2781c27786739abc6f8f948e3068b0c997296524.tar.gz
SMAPI-2781c27786739abc6f8f948e3068b0c997296524.tar.bz2
SMAPI-2781c27786739abc6f8f948e3068b0c997296524.zip
fix error when loading a mod with no version
Diffstat (limited to 'src')
-rw-r--r--src/StardewModdingAPI/Program.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/StardewModdingAPI/Program.cs b/src/StardewModdingAPI/Program.cs
index 3a7cb9ce..ada05320 100644
--- a/src/StardewModdingAPI/Program.cs
+++ b/src/StardewModdingAPI/Program.cs
@@ -330,13 +330,13 @@ namespace StardewModdingAPI
if (string.IsNullOrWhiteSpace(mod.Manifest.Name))
missingFields.Add(nameof(IManifest.Name));
- if (mod.Manifest.Version.ToString() == "0.0")
+ if (mod.Manifest.Version == null || mod.Manifest.Version.ToString() == "0.0")
missingFields.Add(nameof(IManifest.Version));
if (string.IsNullOrWhiteSpace(mod.Manifest.UniqueID))
missingFields.Add(nameof(IManifest.UniqueID));
if (missingFields.Any())
- deprecationWarnings.Add(() => this.Monitor.Log($"{mod.Manifest.Name} is missing some manifest fields ({string.Join(", ", missingFields)}) which will be required in an upcoming SMAPI version.", LogLevel.Warn));
+ deprecationWarnings.Add(() => this.Monitor.Log($"{mod.DisplayName} is missing some manifest fields ({string.Join(", ", missingFields)}) which will be required in an upcoming SMAPI version.", LogLevel.Warn));
}
// per-save directories