summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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