mirror of
https://github.com/ppy/osu
synced 2024-12-12 01:48:49 +00:00
Avoid potential null reference exception in OnlinePlayBeatmapAvailabilityTracker
This commit is contained in:
parent
d9b5f235d8
commit
b121d95400
@ -59,8 +59,8 @@ namespace osu.Game.Online.Rooms
|
|||||||
|
|
||||||
protected override bool VerifyDatabasedModel(BeatmapSetInfo databasedSet)
|
protected override bool VerifyDatabasedModel(BeatmapSetInfo databasedSet)
|
||||||
{
|
{
|
||||||
int? beatmapId = SelectedItem.Value.Beatmap.Value.OnlineBeatmapID;
|
int? beatmapId = SelectedItem.Value?.Beatmap.Value.OnlineBeatmapID;
|
||||||
string checksum = SelectedItem.Value.Beatmap.Value.MD5Hash;
|
string checksum = SelectedItem.Value?.Beatmap.Value.MD5Hash;
|
||||||
|
|
||||||
var matchingBeatmap = databasedSet.Beatmaps.FirstOrDefault(b => b.OnlineBeatmapID == beatmapId && b.MD5Hash == checksum);
|
var matchingBeatmap = databasedSet.Beatmaps.FirstOrDefault(b => b.OnlineBeatmapID == beatmapId && b.MD5Hash == checksum);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user