From 4eff88fe73760ef89423de76cae80ffeee235240 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Thu, 24 Sep 2020 19:41:36 -0400 Subject: fix error in case-insensitive content pack code when mod passes in a null path --- src/SMAPI/Framework/ContentPack.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/SMAPI/Framework/ContentPack.cs') diff --git a/src/SMAPI/Framework/ContentPack.cs b/src/SMAPI/Framework/ContentPack.cs index 161fdbe4..a6835dbe 100644 --- a/src/SMAPI/Framework/ContentPack.cs +++ b/src/SMAPI/Framework/ContentPack.cs @@ -119,7 +119,7 @@ namespace StardewModdingAPI.Framework if (!PathUtilities.IsSafeRelativePath(relativePath)) throw new InvalidOperationException($"You must call {nameof(IContentPack)} methods with a relative path."); - return this.RelativePaths.TryGetValue(relativePath, out string caseInsensitivePath) + return !string.IsNullOrWhiteSpace(relativePath) && this.RelativePaths.TryGetValue(relativePath, out string caseInsensitivePath) ? caseInsensitivePath : relativePath; } -- cgit