Fix tournament population failure when beatmap is not found on server

This commit is contained in:
Dean Herbert
2022-09-01 22:02:58 +09:00
parent 5ca6395295
commit d3ae60ec6d
2 changed files with 1 additions and 4 deletions

View File

@ -2,7 +2,6 @@
// See the LICENCE file in the repository root for full licence text.
using System;
using osu.Framework.Extensions.ObjectExtensions;
using osu.Game.Beatmaps;
using osu.Game.Extensions;
using osu.Game.Online.API.Requests.Responses;
@ -41,7 +40,7 @@ namespace osu.Game.Tournament.Models
StarRating = beatmap.StarRating;
Metadata = beatmap.Metadata;
Difficulty = beatmap.Difficulty;
Covers = beatmap.BeatmapSet.AsNonNull().Covers;
Covers = beatmap.BeatmapSet?.Covers ?? new BeatmapSetOnlineCovers();
}
public bool Equals(IBeatmapInfo? other) => other is TournamentBeatmap b && this.MatchesOnlineID(b);