From dc576c19b47fa64e74bfb9fd440dfccf345bd195 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 14 May 2021 15:10:02 +0900 Subject: [PATCH] Fix a potential nullref when starting `Player` with autoplay enabled and beatmap fails to load --- osu.Game/Screens/Play/Player.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/osu.Game/Screens/Play/Player.cs b/osu.Game/Screens/Play/Player.cs index ac0c921ccf..15983d1d62 100644 --- a/osu.Game/Screens/Play/Player.cs +++ b/osu.Game/Screens/Play/Player.cs @@ -154,6 +154,10 @@ namespace osu.Game.Screens.Play { base.LoadComplete(); + // BDL load may have aborted early. + if (DrawableRuleset == null) + return; + // replays should never be recorded or played back when autoplay is enabled if (!Mods.Value.Any(m => m is ModAutoplay)) PrepareReplay();