1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-15 10:22:56 +08:00

Add missing null check (player construction is potentially delayed now)

This commit is contained in:
Dean Herbert 2020-08-13 12:52:35 +09:00
parent 27cd9e119a
commit 99bea6b8e9

View File

@ -68,7 +68,7 @@ namespace osu.Game.Screens.Play
private bool readyForPush =>
// don't push unless the player is completely loaded
player.LoadState == LoadState.Ready
player?.LoadState == LoadState.Ready
// don't push if the user is hovering one of the panes, unless they are idle.
&& (IsHovered || idleTracker.IsIdle.Value)
// don't push if the user is dragging a slider or otherwise.