diff --git a/osu.Game.Rulesets.Karaoke/Extensions/OsuGameExtensions.cs b/osu.Game.Rulesets.Karaoke/Extensions/OsuGameExtensions.cs index 8d2924168..f2b32300e 100644 --- a/osu.Game.Rulesets.Karaoke/Extensions/OsuGameExtensions.cs +++ b/osu.Game.Rulesets.Karaoke/Extensions/OsuGameExtensions.cs @@ -15,10 +15,10 @@ namespace osu.Game.Rulesets.Karaoke.Extensions; /// public static class OsuGameExtensions { - public static KaraokeRuleset? GetRuleset(this DependencyContainer dependencies) + public static KaraokeRuleset GetRuleset(this DependencyContainer dependencies) { var rulesets = dependencies.Get().AvailableRulesets.Select(info => info.CreateInstance()); - return rulesets.FirstOrDefault(r => r is KaraokeRuleset) as KaraokeRuleset; + return rulesets.OfType().First(); } private static Container? getBasePlacementContainer(this OsuGame game)