summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/release-notes.md1
-rw-r--r--src/SMAPI/Metadata/CoreAssetPropagator.cs2
2 files changed, 2 insertions, 1 deletions
diff --git a/docs/release-notes.md b/docs/release-notes.md
index 979c5d0c..9047ae88 100644
--- a/docs/release-notes.md
+++ b/docs/release-notes.md
@@ -2,6 +2,7 @@
## 2.9.1
* For players:
* Fixed crash in SMAPI 2.9 when constructing certain buildings.
+ * Fixed error when a map asset is reloaded in rare cases.
## 2.9
* For players:
diff --git a/src/SMAPI/Metadata/CoreAssetPropagator.cs b/src/SMAPI/Metadata/CoreAssetPropagator.cs
index d273c251..90629d7f 100644
--- a/src/SMAPI/Metadata/CoreAssetPropagator.cs
+++ b/src/SMAPI/Metadata/CoreAssetPropagator.cs
@@ -92,7 +92,7 @@ namespace StardewModdingAPI.Metadata
bool anyChanged = false;
foreach (GameLocation location in this.GetLocations())
{
- if (this.GetNormalisedPath(location.mapPath.Value) == key)
+ if (!string.IsNullOrWhiteSpace(location.mapPath.Value) && this.GetNormalisedPath(location.mapPath.Value) == key)
{
this.Reflection.GetMethod(location, "reloadMap").Invoke();
this.Reflection.GetMethod(location, "updateWarps").Invoke();