Skip to content

Commit e1e46ad

Browse files
authored
Merge pull request #20073 from peppy/fix-tournament-lookup
Fix tournament population failure when beatmap is not found on server
2 parents 8b26527 + d3ae60e commit e1e46ad

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

osu.Game.Tournament/Models/TournamentBeatmap.cs

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// See the LICENCE file in the repository root for full licence text.
33

44
using System;
5-
using osu.Framework.Extensions.ObjectExtensions;
65
using osu.Game.Beatmaps;
76
using osu.Game.Extensions;
87
using osu.Game.Online.API.Requests.Responses;
@@ -41,7 +40,7 @@ public TournamentBeatmap(APIBeatmap beatmap)
4140
StarRating = beatmap.StarRating;
4241
Metadata = beatmap.Metadata;
4342
Difficulty = beatmap.Difficulty;
44-
Covers = beatmap.BeatmapSet.AsNonNull().Covers;
43+
Covers = beatmap.BeatmapSet?.Covers ?? new BeatmapSetOnlineCovers();
4544
}
4645

4746
public bool Equals(IBeatmapInfo? other) => other is TournamentBeatmap b && this.MatchesOnlineID(b);

osu.Game/Beatmaps/BeatmapSetOnlineCovers.cs

-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
22
// See the LICENCE file in the repository root for full licence text.
33

4-
#nullable disable
5-
64
using Newtonsoft.Json;
75

86
namespace osu.Game.Beatmaps

0 commit comments

Comments
 (0)