From f0e1a46f0fa52b4365c8ccb64c7fe4784002257b Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sun, 11 Mar 2018 21:07:45 -0400 Subject: fix error when content pack needs a mod that couldn't be loaded --- src/SMAPI/Program.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/SMAPI/Program.cs') 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)) -- cgit