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

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);

View File

@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
#nullable disable
using Newtonsoft.Json;
namespace osu.Game.Beatmaps