1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-13 16:47:46 +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)
{