mirror of
https://github.com/ppy/osu
synced 2025-01-04 21:30:08 +00:00
Add non-null check to appease inspection
This commit is contained in:
parent
ccc8012fd4
commit
364fa068b3
@ -105,7 +105,11 @@ namespace osu.Game.Stores
|
||||
{
|
||||
var rulesets = realm.All<RealmRuleset>();
|
||||
|
||||
List<Ruleset> instances = loadedAssemblies.Values.Select(r => Activator.CreateInstance(r) as Ruleset).OfType<Ruleset>().ToList();
|
||||
List<Ruleset> instances = loadedAssemblies.Values
|
||||
.Select(r => Activator.CreateInstance(r) as Ruleset)
|
||||
.Where(r => r != null)
|
||||
.Cast<Ruleset>()
|
||||
.ToList();
|
||||
|
||||
// add all legacy rulesets first to ensure they have exclusive choice of primary key.
|
||||
foreach (var r in instances.Where(r => r is ILegacyRuleset))
|
||||
|
Loading…
Reference in New Issue
Block a user