summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/release-notes.md3
-rw-r--r--src/SMAPI/Program.cs4
2 files changed, 4 insertions, 3 deletions
diff --git a/docs/release-notes.md b/docs/release-notes.md
index c40e41be..33e66a14 100644
--- a/docs/release-notes.md
+++ b/docs/release-notes.md
@@ -18,7 +18,8 @@
## 2.5.4
* For players:
* Fixed tree textures not updated when changed through the content API.
- * Fixed display bugs on Linux/Mac when mods overlay images through the content API.
+ * Fixed visual bug on Linux/Mac when mods overlay images through the content API.
+ * Fixed error when a mod removes an asset editor/loader.
* For the [log parser][]:
* Fixed error when log text contains certain tokens.
diff --git a/src/SMAPI/Program.cs b/src/SMAPI/Program.cs
index 8c1ea238..1b8cb2ba 100644
--- a/src/SMAPI/Program.cs
+++ b/src/SMAPI/Program.cs
@@ -953,7 +953,7 @@ namespace StardewModdingAPI
{
helper.ObservableAssetEditors.CollectionChanged += (sender, e) =>
{
- if (e.NewItems.Count > 0)
+ if (e.NewItems?.Count > 0)
{
this.Monitor.Log("Invalidating cache entries for new asset editors...", LogLevel.Trace);
this.ContentCore.InvalidateCacheFor(e.NewItems.Cast<IAssetEditor>().ToArray(), new IAssetLoader[0]);
@@ -961,7 +961,7 @@ namespace StardewModdingAPI
};
helper.ObservableAssetLoaders.CollectionChanged += (sender, e) =>
{
- if (e.NewItems.Count > 0)
+ if (e.NewItems?.Count > 0)
{
this.Monitor.Log("Invalidating cache entries for new asset loaders...", LogLevel.Trace);
this.ContentCore.InvalidateCacheFor(new IAssetEditor[0], e.NewItems.Cast<IAssetLoader>().ToArray());