Fix `BeatmapInfo` file lookup not handling the case where no files exist

Quite common for test scenes.
This commit is contained in:
Dean Herbert 2021-12-21 16:09:32 +09:00
parent 167c399e8a
commit 2a980cc474
1 changed files with 1 additions and 1 deletions

View File

@ -38,7 +38,7 @@ public class BeatmapInfo : RealmObject, IHasGuidPrimaryKey, IBeatmapInfo, IEquat
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
{