1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 15:12:57 +08:00

Add temporary accounting for tests with null files

This commit is contained in:
Dean Herbert 2021-05-28 14:31:09 +09:00
parent 9c4f39e968
commit e52c0a34f8

View File

@ -293,7 +293,11 @@ namespace osu.Game.Beatmaps
if (beatmapInfo?.BeatmapSet == null || beatmapInfo == DefaultBeatmap?.BeatmapInfo)
return DefaultBeatmap;
if (beatmapInfo.BeatmapSet.Files == null)
// files may be null in some tests.
if (beatmapInfo.BeatmapSet?.Files == null)
return DefaultBeatmap;
if (beatmapInfo.BeatmapSet.Files.Count == 0)
{
var info = beatmapInfo;
beatmapInfo = QueryBeatmap(b => b.ID == info.ID);