Avoid doing any re-fetch on beatmap from test scenes

This commit is contained in:
Dean Herbert
2021-05-19 17:58:28 +09:00
parent b33d5e7a7a
commit a639132825
2 changed files with 6 additions and 3 deletions

View File

@ -286,11 +286,10 @@ namespace osu.Game.Beatmaps
{
if (beatmapInfo?.ID > 0 && previous != null && previous.BeatmapInfo?.ID == beatmapInfo.ID)
return previous;
if (beatmapInfo?.BeatmapSet == null || beatmapInfo == DefaultBeatmap?.BeatmapInfo)
return DefaultBeatmap;
if (beatmapInfo.BeatmapSet.Files == null)
if (beatmapInfo.BeatmapSet.Files == null || beatmapInfo.ID == 0)
{
var info = beatmapInfo;
beatmapInfo = QueryBeatmap(b => b.ID == info.ID);