From 3e5fe66e58b3bf3e36761511883b8c0170f7c0e0 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 22 Jan 2024 16:37:56 +0900 Subject: [PATCH] Fix potential null reference in player screen transition handling See https://github.com/ppy/osu/actions/runs/7607677219/job/20715418536?pr=26660. --- osu.Game/Screens/Play/Player.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/osu.Game/Screens/Play/Player.cs b/osu.Game/Screens/Play/Player.cs index db39d06c54..ad1f9ec897 100644 --- a/osu.Game/Screens/Play/Player.cs +++ b/osu.Game/Screens/Play/Player.cs @@ -1240,9 +1240,14 @@ namespace osu.Game.Screens.Play { b.IgnoreUserSettings.Value = true; - b.IsBreakTime.UnbindFrom(breakTracker.IsBreakTime); - b.IsBreakTime.Value = false; + // May be null if the load never completed. + if (breakTracker != null) + { + b.IsBreakTime.UnbindFrom(breakTracker.IsBreakTime); + b.IsBreakTime.Value = false; + } }); + storyboardReplacesBackground.Value = false; } }