Skip to content

Commit a6c7d75

Browse files
authored
Fixed a bug that caused an exception if DLLs that failed to load were mixed in (#84)
1 parent 1e7fba3 commit a6c7d75

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

ConfigurationManager/SettingSearcher.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ public static BaseUnityPlugin[] FindPlugins()
2828
// Have to use FindObjectsOfType(Type) instead of FindObjectsOfType<T> because the latter is not available in some older unity versions.
2929
// Still look inside Chainloader.PluginInfos in case the BepInEx_Manager GameObject uses HideFlags.HideAndDontSave, which hides it from Object.Find methods.
3030
return Chainloader.PluginInfos.Values.Select(x => x.Instance)
31+
.Where(plugin => plugin != null)
3132
.Union(UnityEngine.Object.FindObjectsOfType(typeof(BaseUnityPlugin)).Cast<BaseUnityPlugin>())
3233
.ToArray();
3334
}

0 commit comments

Comments
 (0)