From d1a829497292ea4c72da5f9bbfb3b50404e06022 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Thu, 28 Dec 2017 00:16:54 -0500 Subject: fix issue where assemblies could be incorrectly reloaded --- src/SMAPI/Framework/ModLoading/AssemblyLoader.cs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/SMAPI/Framework/ModLoading/AssemblyLoader.cs') 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 -- cgit