Avoid potential null reference exception in OnlinePlayBeatmapAvailabilityTracker

This commit is contained in:
Dean Herbert 2021-08-10 17:37:24 +09:00
parent d9b5f235d8
commit b121d95400

View File

@ -59,8 +59,8 @@ namespace osu.Game.Online.Rooms
protected override bool VerifyDatabasedModel(BeatmapSetInfo databasedSet)
{
int? beatmapId = SelectedItem.Value.Beatmap.Value.OnlineBeatmapID;
string checksum = SelectedItem.Value.Beatmap.Value.MD5Hash;
int? beatmapId = SelectedItem.Value?.Beatmap.Value.OnlineBeatmapID;
string checksum = SelectedItem.Value?.Beatmap.Value.MD5Hash;
var matchingBeatmap = databasedSet.Beatmaps.FirstOrDefault(b => b.OnlineBeatmapID == beatmapId && b.MD5Hash == checksum);