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

Move check into callback

This commit is contained in:
smoogipoo 2021-05-21 16:00:58 +09:00
parent 36aa186c6e
commit 7c59fb37f1

View File

@ -167,13 +167,13 @@ namespace osu.Game.Online.Spectator
public void EndPlaying()
{
if (!IsPlaying)
return;
// This method is most commonly called via Dispose(), which is asynchronous.
// Todo: This should not be a thing, but requires framework changes.
Schedule(() =>
{
if (!IsPlaying)
return;
IsPlaying = false;
currentBeatmap = null;