summaryrefslogtreecommitdiff
path: root/src/SMAPI
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2018-05-01 00:05:24 -0400
committerJesse Plamondon-Willard <github@jplamondonw.com>2018-05-01 00:05:24 -0400
commitc6420f0e645687e13f3727e08adc4be6bafc7834 (patch)
treec114af95b2b64fbbdf3834632fc5d04be84655a5 /src/SMAPI
parent622140689042fd53b164e51a1872b9c2bdc71ed8 (diff)
downloadSMAPI-c6420f0e645687e13f3727e08adc4be6bafc7834.tar.gz
SMAPI-c6420f0e645687e13f3727e08adc4be6bafc7834.tar.bz2
SMAPI-c6420f0e645687e13f3727e08adc4be6bafc7834.zip
fix error during content manager disposal in some cases
Diffstat (limited to 'src/SMAPI')
-rw-r--r--src/SMAPI/Framework/ContentCore.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/SMAPI/Framework/ContentCore.cs b/src/SMAPI/Framework/ContentCore.cs
index 6e915f28..80fedd6c 100644
--- a/src/SMAPI/Framework/ContentCore.cs
+++ b/src/SMAPI/Framework/ContentCore.cs
@@ -379,7 +379,7 @@ namespace StardewModdingAPI.Framework
{
foreach (var entry in this.ContentManagersByAssetKey)
entry.Value.Remove(shim);
- this.InvalidateCache((key, type) => !this.ContentManagersByAssetKey[key].Any(), dispose: true);
+ this.InvalidateCache((key, type) => !this.ContentManagersByAssetKey.TryGetValue(key, out var managers) || !managers.Any(), dispose: true);
});
}