Perform null check on gameplay state.

This commit is contained in:
Nitrous 2024-01-09 12:24:09 +08:00
parent bb2b7d3c31
commit 2e041823a1
No known key found for this signature in database
GPG Key ID: A5D82BAEC7C1D1F5

View File

@ -136,7 +136,7 @@ namespace osu.Game.Screens.Play.PlayerSettings
void seek(int direction, double amount)
{
double target = Math.Clamp((gameplayClock?.CurrentTime ?? 0) + (direction * amount), 0, gameplayState.Beatmap.GetLastObjectTime());
double target = Math.Clamp((gameplayClock?.CurrentTime ?? 0) + (direction * amount), 0, gameplayState?.Beatmap.GetLastObjectTime() ?? 0);
gameplayClock?.Seek(target);
}
}