1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 22:22:55 +08:00

Avoid NRE due to a beatmap loading with no hit objects.

This commit is contained in:
Nitrous 2024-01-12 17:19:59 +08:00
parent c545a9c242
commit ccbba8a00b
No known key found for this signature in database
GPG Key ID: A5D82BAEC7C1D1F5

View File

@ -54,11 +54,14 @@ namespace osu.Game.Screens.Play
{
base.LoadComplete();
var playerSettingsOverlay = new PlaybackSettings { Expanded = { Value = false } };
HUDOverlay.PlayerSettingsOverlay.Add(playerSettingsOverlay);
if (HUDOverlay != null)
{
var playerSettingsOverlay = new PlaybackSettings { Expanded = { Value = false } };
HUDOverlay.PlayerSettingsOverlay.Add(playerSettingsOverlay);
if (GameplayClockContainer is MasterGameplayClockContainer master)
playerSettingsOverlay.UserPlaybackRate.BindTarget = master.UserPlaybackRate;
if (GameplayClockContainer is MasterGameplayClockContainer master)
playerSettingsOverlay.UserPlaybackRate.BindTarget = master.UserPlaybackRate;
}
}
protected override void PrepareReplay()