From 8ff41110275facadf6dca2814047e8aa6f4a26fa Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Fri, 7 Dec 2018 16:17:45 -0500 Subject: fix crash when constucting buildings that have an interior --- docs/release-notes.md | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'docs') diff --git a/docs/release-notes.md b/docs/release-notes.md index cf11df7c..979c5d0c 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -1,4 +1,8 @@ # Release notes +## 2.9.1 +* For players: + * Fixed crash in SMAPI 2.9 when constructing certain buildings. + ## 2.9 * For players: * Added support for ModDrop in update checks and the mod compatibility list. -- cgit From 085b1be28cc9ecc323f9a29bc319c43a3cfd13e5 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Fri, 7 Dec 2018 16:29:06 -0500 Subject: fix error when a location doesn't have a map asset key --- docs/release-notes.md | 1 + src/SMAPI/Metadata/CoreAssetPropagator.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'docs') 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(); -- cgit