diff --git a/build/common.props b/build/common.props index f63a912..606cd14 100644 --- a/build/common.props +++ b/build/common.props @@ -3,7 +3,7 @@ - 1.7.4 + 1.7.5 2.0.4 2.0.0.78 3.0.94 diff --git a/changelog.txt b/changelog.txt index 8f49429..794845a 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,8 @@ --------------------------------------------------------------------------------------------------- +Version: 1.7.5 +Game Versions: e1.5.0,e1.5.1,e1.5.2,e1.5.3,e1.5.4,e1.5.5,e1.5.6,e1.5.7,e1.5.8,e1.5.9,e1.5.10,e1.6.0,e1.6.1,e1.6.2,e1.6.3,e1.6.4,e1.6.5,e1.7.0,e1.7.1,e1.7.2 +* Fixed additional crash at launch when an incompatible module is used +--------------------------------------------------------------------------------------------------- Version: 1.7.4 Game Versions: e1.5.0,e1.5.1,e1.5.2,e1.5.3,e1.5.4,e1.5.5,e1.5.6,e1.5.7,e1.5.8,e1.5.9,e1.5.10,e1.6.0,e1.6.1,e1.6.2,e1.6.3,e1.6.4,e1.6.5,e1.7.0,e1.7.1,e1.7.2 * Fixed crash at launch when an incompatible module is used diff --git a/src/Bannerlord.BUTRLoader/Features/Interceptor/InterceptorFeature.cs b/src/Bannerlord.BUTRLoader/Features/Interceptor/InterceptorFeature.cs index 1c17bf9..93fb60e 100644 --- a/src/Bannerlord.BUTRLoader/Features/Interceptor/InterceptorFeature.cs +++ b/src/Bannerlord.BUTRLoader/Features/Interceptor/InterceptorFeature.cs @@ -25,8 +25,11 @@ static bool CheckType(Type type) => type.GetCustomAttributes() IEnumerable enumerable; try { - var types = assembly.GetTypes(); // Force type resolution - enumerable = types.Where(CheckType); + enumerable = assembly.GetTypes().Where(CheckType).ToArray(); // Force type resolution + } + catch (TypeLoadException) + { + enumerable = Enumerable.Empty(); // ignore the incompatibility, not our problem } catch (ReflectionTypeLoadException) {