summaryrefslogtreecommitdiff
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
parent16281fb58944e7e829b184b014e27822c91c9f43 (diff)
downloadSMAPI-2781c27786739abc6f8f948e3068b0c997296524.tar.gz
SMAPI-2781c27786739abc6f8f948e3068b0c997296524.tar.bz2
SMAPI-2781c27786739abc6f8f948e3068b0c997296524.zip
fix error when loading a mod with no version
-rw-r--r--release-notes.md6
-rw-r--r--src/StardewModdingAPI/Program.cs4
2 files changed, 8 insertions, 2 deletions
diff --git a/release-notes.md b/release-notes.md
index 641071e5..ce91c693 100644
--- a/release-notes.md
+++ b/release-notes.md
@@ -10,6 +10,12 @@ For mod developers:
images).
-->
+## 1.13.1
+See [log](https://github.com/Pathoschild/SMAPI/compare/1.13...1.13.1).
+
+For players:
+* Fixed error when loading a mod with no version.
+
## 1.13
See [log](https://github.com/Pathoschild/SMAPI/compare/1.12...1.13).
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