diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 03b6308f97..007e4341b8 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -9,7 +9,7 @@ ] }, "jetbrains.resharper.globaltools": { - "version": "2021.2.2", + "version": "2020.3.2", "commands": [ "jb" ] diff --git a/osu.Game/Stores/RealmRulesetStore.cs b/osu.Game/Stores/RealmRulesetStore.cs index 1b298f9d49..51f059caad 100644 --- a/osu.Game/Stores/RealmRulesetStore.cs +++ b/osu.Game/Stores/RealmRulesetStore.cs @@ -106,8 +106,9 @@ private void addMissingRulesets() var rulesets = realm.All(); List instances = loadedAssemblies.Values - .Select(Activator.CreateInstance) - .OfType() + .Select(r => Activator.CreateInstance(r) as Ruleset) + .Where(r => r != null) + .Cast() .ToList(); // add all legacy rulesets first to ensure they have exclusive choice of primary key.