fix concurrency issue in interface proxying
This commit is contained in:
parent
735893c1d5
commit
defa1b9a95
|
@ -10,6 +10,7 @@
|
|||
## Upcoming release
|
||||
* For players:
|
||||
* Added error message if you manually install the wrong SMAPI bitness (e.g. 32-bit SMAPI with 64-bit game).
|
||||
* Fixed intermittent error if a mod fetches mod-provided APIs asynchronously.
|
||||
|
||||
## 3.11.0
|
||||
Released 09 July 2021 for Stardew Valley 1.5.4 or later. See [release highlights](https://www.patreon.com/posts/53514295).
|
||||
|
|
|
@ -35,6 +35,8 @@ namespace StardewModdingAPI.Framework.Reflection
|
|||
/// <param name="targetModID">The unique ID of the mod providing the API.</param>
|
||||
public TInterface CreateProxy<TInterface>(object instance, string sourceModID, string targetModID)
|
||||
where TInterface : class
|
||||
{
|
||||
lock (this.Builders)
|
||||
{
|
||||
// validate
|
||||
if (instance == null)
|
||||
|
@ -56,3 +58,4 @@ namespace StardewModdingAPI.Framework.Reflection
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue