diff options
-rw-r--r-- | docs/release-notes.md | 1 | ||||
-rw-r--r-- | src/SMAPI/Program.cs | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/docs/release-notes.md b/docs/release-notes.md index 7297fb59..1e32eb8d 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -14,6 +14,7 @@ * Fixed rare crash with some combinations of manifest fields and internal mod data. * Fixed update checks failing for Nexus Mods due to a change in their API. * Fixed update checks failing for some older mods with non-standard versions. + * Fixed error when a content pack needs a mod that couldn't be loaded. * Updated compatibility list and added update checks for more mods. * For the [log parser][]: diff --git a/src/SMAPI/Program.cs b/src/SMAPI/Program.cs index e713add5..4bd40710 100644 --- a/src/SMAPI/Program.cs +++ b/src/SMAPI/Program.cs @@ -854,7 +854,7 @@ namespace StardewModdingAPI // log loaded content packs if (loadedContentPacks.Any()) { - string GetModDisplayName(string id) => loadedMods.First(p => id != null && id.Equals(p.Manifest?.UniqueID, StringComparison.InvariantCultureIgnoreCase))?.DisplayName; + string GetModDisplayName(string id) => loadedMods.FirstOrDefault(p => id != null && id.Equals(p.Manifest?.UniqueID, StringComparison.InvariantCultureIgnoreCase))?.DisplayName; this.Monitor.Log($"Loaded {loadedContentPacks.Length} content packs:", LogLevel.Info); foreach (IModMetadata metadata in loadedContentPacks.OrderBy(p => p.DisplayName)) |