diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-05-01 00:05:24 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-05-01 00:05:24 -0400 |
commit | c6420f0e645687e13f3727e08adc4be6bafc7834 (patch) | |
tree | c114af95b2b64fbbdf3834632fc5d04be84655a5 /src/SMAPI | |
parent | 622140689042fd53b164e51a1872b9c2bdc71ed8 (diff) | |
download | SMAPI-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.cs | 2 |
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); }); } |