1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 11:37:28 +08:00

Fix ruleset instance creation null checks

This commit is contained in:
Dean Herbert 2021-11-22 16:08:42 +09:00
parent 33d95fbb9c
commit db2d8b6d8b

View File

@ -42,7 +42,12 @@ namespace osu.Game.Tournament.Tests.Components
private void success(APIBeatmap beatmap) private void success(APIBeatmap beatmap)
{ {
var mods = rulesets.GetRuleset(Ladder.Ruleset.Value.ID ?? 0).CreateInstance().AllMods; var ruleset = rulesets.GetRuleset(Ladder.Ruleset.Value.OnlineID);
if (ruleset == null)
return;
var mods = ruleset.CreateInstance().AllMods;
foreach (var mod in mods) foreach (var mod in mods)
{ {