1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 06:57:39 +08:00

Fix a potential nullref when starting Player with autoplay enabled and beatmap fails to load

This commit is contained in:
Dean Herbert 2021-05-14 15:10:02 +09:00
parent 475c7e4a45
commit dc576c19b4

View File

@ -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();