fix issue where assemblies could be incorrectly reloaded

This commit is contained in:
Jesse Plamondon-Willard 2017-12-28 00:16:54 -05:00
parent e98cd922f4
commit d1a8294972
2 changed files with 8 additions and 0 deletions

View File

@ -1,4 +1,8 @@
# Release notes
## 2.4
* For players:
* Fixed rare issues caused by assembly references being incorrectly loaded twice.
## 2.3
* For players:
* Added a user-friendly [download page](https://smapi.io).

View File

@ -162,7 +162,11 @@ namespace StardewModdingAPI.Framework.ModLoading
// skip if already visited
if (visitedAssemblyNames.Contains(assembly.Name.Name))
{
yield return new AssemblyParseResult(file, null, AssemblyLoadStatus.AlreadyLoaded);
yield break;
}
visitedAssemblyNames.Add(assembly.Name.Name);
// yield referenced assemblies