1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 22:07:25 +08:00

Fix some missed null checks

This commit is contained in:
Dean Herbert 2023-07-27 17:41:27 +09:00
parent fa4992f05a
commit 1e9b927b50

View File

@ -163,11 +163,11 @@ namespace osu.Game.Tournament.Screens.MapPool
if (map != null)
{
if (e.Button == MouseButton.Left && map.Beatmap.OnlineID > 0)
if (e.Button == MouseButton.Left && map.Beatmap?.OnlineID > 0)
addForBeatmap(map.Beatmap.OnlineID);
else
{
var existing = CurrentMatch.Value.PicksBans.FirstOrDefault(p => p.BeatmapID == map.Beatmap.OnlineID);
var existing = CurrentMatch.Value.PicksBans.FirstOrDefault(p => p.BeatmapID == map.Beatmap?.OnlineID);
if (existing != null)
{