diff options
-rw-r--r-- | docs/release-notes.md | 1 | ||||
-rw-r--r-- | src/SMAPI/Framework/SContentManager.cs | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/docs/release-notes.md b/docs/release-notes.md index c4c269eb..6b0c5d28 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -7,6 +7,7 @@ * For modders: * Fixed error when accessing a mod-provided API whose underlying class is `internal`. + * Fixed deadlock in rare cases when injecting a file with an asset loader. * For SMAPI developers: * All mod assemblies are now rewritten in-memory to support features like mod-provided APIs. diff --git a/src/SMAPI/Framework/SContentManager.cs b/src/SMAPI/Framework/SContentManager.cs index ff227fac..463fea0b 100644 --- a/src/SMAPI/Framework/SContentManager.cs +++ b/src/SMAPI/Framework/SContentManager.cs @@ -792,12 +792,12 @@ namespace StardewModdingAPI.Framework { try { - this.Lock.EnterReadLock(); + this.Lock.EnterWriteLock(); return action(); } finally { - this.Lock.ExitReadLock(); + this.Lock.ExitWriteLock(); } } } |