summaryrefslogtreecommitdiff
path: root/src/SMAPI/Program.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/SMAPI/Program.cs')
-rw-r--r--src/SMAPI/Program.cs4
1 files changed, 2 insertions, 2 deletions
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());