diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-12-28 00:16:54 -0500 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-12-28 00:16:54 -0500 |
commit | d1a829497292ea4c72da5f9bbfb3b50404e06022 (patch) | |
tree | 62acd1e0209e487cf74ecaf0d485bb10865ce338 /src/SMAPI/Framework/ModLoading | |
parent | e98cd922f4d8292215c7b69e19931a8dfb0b3d61 (diff) | |
download | SMAPI-d1a829497292ea4c72da5f9bbfb3b50404e06022.tar.gz SMAPI-d1a829497292ea4c72da5f9bbfb3b50404e06022.tar.bz2 SMAPI-d1a829497292ea4c72da5f9bbfb3b50404e06022.zip |
fix issue where assemblies could be incorrectly reloaded
Diffstat (limited to 'src/SMAPI/Framework/ModLoading')
-rw-r--r-- | src/SMAPI/Framework/ModLoading/AssemblyLoader.cs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/SMAPI/Framework/ModLoading/AssemblyLoader.cs b/src/SMAPI/Framework/ModLoading/AssemblyLoader.cs index 1e3c4a05..3a7b214a 100644 --- a/src/SMAPI/Framework/ModLoading/AssemblyLoader.cs +++ b/src/SMAPI/Framework/ModLoading/AssemblyLoader.cs @@ -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 |