From 959b1ac845e8790f111004c00534c73df5c467ac Mon Sep 17 00:00:00 2001 From: Dan Balasescu <1329837+smoogipoo@users.noreply.github.com> Date: Fri, 8 Feb 2019 17:28:00 +0900 Subject: [PATCH 1/2] Fix potential nullref when exiting multiplayer (#4227) Fixes https://github.com/ppy/osu/issues/3954 --- osu.Game/Screens/Multi/Multiplayer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/Screens/Multi/Multiplayer.cs b/osu.Game/Screens/Multi/Multiplayer.cs index 1741ac0b7b..50f190479b 100644 --- a/osu.Game/Screens/Multi/Multiplayer.cs +++ b/osu.Game/Screens/Multi/Multiplayer.cs @@ -218,7 +218,7 @@ namespace osu.Game.Screens.Multi private void cancelLooping() { - var track = beatmap.Value.Track; + var track = beatmap?.Value?.Track; if (track != null) track.Looping = false; } From 7ec0b4ba773180ad8d9c73004dbf1d766df6d38e Mon Sep 17 00:00:00 2001 From: Dan Balasescu <1329837+smoogipoo@users.noreply.github.com> Date: Fri, 8 Feb 2019 17:53:01 +0900 Subject: [PATCH 2/2] Fix nullref during room creation (#4228) --- osu.Game/Screens/Multi/Match/Components/ReadyButton.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/osu.Game/Screens/Multi/Match/Components/ReadyButton.cs b/osu.Game/Screens/Multi/Match/Components/ReadyButton.cs index 1bde6270f6..102e75cfb7 100644 --- a/osu.Game/Screens/Multi/Match/Components/ReadyButton.cs +++ b/osu.Game/Screens/Multi/Match/Components/ReadyButton.cs @@ -55,6 +55,9 @@ namespace osu.Game.Screens.Multi.Match.Components private void beatmapAdded(BeatmapSetInfo model, bool existing, bool silent) { + if (Beatmap.Value == null) + return; + if (model.Beatmaps.Any(b => b.OnlineBeatmapID == Beatmap.Value.OnlineBeatmapID)) Schedule(() => hasBeatmap = true); }