summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/ModLoading
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2017-12-28 00:16:54 -0500
committerJesse Plamondon-Willard <github@jplamondonw.com>2017-12-28 00:16:54 -0500
commitd1a829497292ea4c72da5f9bbfb3b50404e06022 (patch)
tree62acd1e0209e487cf74ecaf0d485bb10865ce338 /src/SMAPI/Framework/ModLoading
parente98cd922f4d8292215c7b69e19931a8dfb0b3d61 (diff)
downloadSMAPI-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.cs4
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