Fix incorrect argument passing to ToMod

This commit is contained in:
Dean Herbert 2022-08-08 12:56:18 +09:00
parent 8b990ef3c9
commit f1691882e2

View File

@ -78,7 +78,7 @@ namespace osu.Game.Screens.OnlinePlay
private IBeatmapInfo beatmap;
private IRulesetInfo ruleset;
private Mod[] requiredMods;
private Mod[] requiredMods = Array.Empty<Mod>();
private Container maskingContainer;
private Container difficultyIconContainer;
@ -139,7 +139,8 @@ namespace osu.Game.Screens.OnlinePlay
ruleset = rulesets.GetRuleset(Item.RulesetID);
var rulesetInstance = ruleset?.CreateInstance();
requiredMods = Item.RequiredMods.Select(m => m.ToMod(rulesetInstance)).ToArray();
if (rulesetInstance != null)
requiredMods = Item.RequiredMods.Select(m => m.ToMod(rulesetInstance)).ToArray();
}
protected override void LoadComplete()