summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2020-01-25 11:05:36 -0500
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2020-01-25 11:05:36 -0500
commit4db7ca28f68be2e25b565a1b98e2c05fb42a5a88 (patch)
tree331510c23d59a3a718f00f7e6bcd4a075290f8af
parente33386abcc03c6fd94c365309a23e66f0fe9d6eb (diff)
downloadSMAPI-4db7ca28f68be2e25b565a1b98e2c05fb42a5a88.tar.gz
SMAPI-4db7ca28f68be2e25b565a1b98e2c05fb42a5a88.tar.bz2
SMAPI-4db7ca28f68be2e25b565a1b98e2c05fb42a5a88.zip
fix error building/demolishing buildings for some players
-rw-r--r--docs/release-notes.md1
-rw-r--r--src/SMAPI/Framework/SnapshotListDiff.cs6
2 files changed, 5 insertions, 2 deletions
diff --git a/docs/release-notes.md b/docs/release-notes.md
index 970f26f1..d8ff8f6a 100644
--- a/docs/release-notes.md
+++ b/docs/release-notes.md
@@ -10,6 +10,7 @@
* Fixed 'collection was modified' error when returning to title in rare cases.
* Fixed update-check error if a mod's Chucklefish page has no version.
* Fixed SMAPI beta versions not showing update alert on next launch (thanks to danvolchek!).
+ * Fixed rare error when building/demolishing buildings.
* For the Console Commands mod:
* Added `test_input` command to view button codes in the console.
diff --git a/src/SMAPI/Framework/SnapshotListDiff.cs b/src/SMAPI/Framework/SnapshotListDiff.cs
index d4d5df50..2d0efa0d 100644
--- a/src/SMAPI/Framework/SnapshotListDiff.cs
+++ b/src/SMAPI/Framework/SnapshotListDiff.cs
@@ -42,10 +42,12 @@ namespace StardewModdingAPI.Framework
this.IsChanged = isChanged;
this.RemovedImpl.Clear();
- this.RemovedImpl.AddRange(removed);
+ if (removed != null)
+ this.RemovedImpl.AddRange(removed);
this.AddedImpl.Clear();
- this.AddedImpl.AddRange(added);
+ if (added != null)
+ this.AddedImpl.AddRange(added);
}
/// <summary>Update the snapshot.</summary>