summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/ContentPack.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2020-09-24 19:41:36 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2020-09-24 19:41:36 -0400
commit4eff88fe73760ef89423de76cae80ffeee235240 (patch)
treeb4cf81eda49be01a8ab148ae81861e563afc01fd /src/SMAPI/Framework/ContentPack.cs
parent9edd3b901a110ef1fddcbcc05730da1b1cadd680 (diff)
downloadSMAPI-4eff88fe73760ef89423de76cae80ffeee235240.tar.gz
SMAPI-4eff88fe73760ef89423de76cae80ffeee235240.tar.bz2
SMAPI-4eff88fe73760ef89423de76cae80ffeee235240.zip
fix error in case-insensitive content pack code when mod passes in a null path
Diffstat (limited to 'src/SMAPI/Framework/ContentPack.cs')
-rw-r--r--src/SMAPI/Framework/ContentPack.cs2
1 files changed, 1 insertions, 1 deletions
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;
}