From 3292ef33fd72f3b3ae81bf8bd4487a9cc951efc7 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 20 Dec 2017 21:06:33 +0900 Subject: [PATCH] Fix test edge cases --- osu.Game.Tests/Visual/TestCaseLeaderboard.cs | 2 +- osu.Game/Screens/Select/Leaderboards/Leaderboard.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game.Tests/Visual/TestCaseLeaderboard.cs b/osu.Game.Tests/Visual/TestCaseLeaderboard.cs index 52daf95810..62aa5a79b3 100644 --- a/osu.Game.Tests/Visual/TestCaseLeaderboard.cs +++ b/osu.Game.Tests/Visual/TestCaseLeaderboard.cs @@ -267,7 +267,7 @@ namespace osu.Game.Tests.Visual private void networkFailure() { - leaderboard.Beatmap = new BeatmapInfo(); + leaderboard.Beatmap = new BeatmapInfo { Ruleset = rulesets.GetRuleset(0) }; } private class FailableLeaderboard : Leaderboard diff --git a/osu.Game/Screens/Select/Leaderboards/Leaderboard.cs b/osu.Game/Screens/Select/Leaderboards/Leaderboard.cs index decd966fa1..2d9cec4cc0 100644 --- a/osu.Game/Screens/Select/Leaderboards/Leaderboard.cs +++ b/osu.Game/Screens/Select/Leaderboards/Leaderboard.cs @@ -215,7 +215,7 @@ namespace osu.Game.Screens.Select.Leaderboards return; } - getScoresRequest = new GetScoresRequest(Beatmap, osuGame?.Ruleset.Value, Scope); + getScoresRequest = new GetScoresRequest(Beatmap, osuGame?.Ruleset.Value ?? Beatmap.Ruleset, Scope); getScoresRequest.Success += r => { Scores = r.Scores;