From 2a980cc474a70993b160da4eb6c4ce80f0c8d634 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 21 Dec 2021 16:09:32 +0900 Subject: [PATCH] Fix `BeatmapInfo` file lookup not handling the case where no files exist Quite common for test scenes. --- osu.Game/Beatmaps/BeatmapInfo.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/Beatmaps/BeatmapInfo.cs b/osu.Game/Beatmaps/BeatmapInfo.cs index fc0d007df4..16133ae362 100644 --- a/osu.Game/Beatmaps/BeatmapInfo.cs +++ b/osu.Game/Beatmaps/BeatmapInfo.cs @@ -38,7 +38,7 @@ namespace osu.Game.Beatmaps public BeatmapSetInfo? BeatmapSet { get; set; } [Ignored] - public RealmNamedFileUsage? File => BeatmapSet?.Files.First(f => f.File.Hash == Hash); + public RealmNamedFileUsage? File => BeatmapSet?.Files.FirstOrDefault(f => f.File.Hash == Hash); public BeatmapOnlineStatus Status {