mirror of https://github.com/ppy/osu
Fix EndPlaying potentially doing cross-thread mutation
This commit is contained in:
parent
2fdf8aa1aa
commit
7f712a4d04
|
@ -167,10 +167,15 @@ public void BeginPlaying(GameplayBeatmap beatmap, Score score)
|
|||
|
||||
public void EndPlaying()
|
||||
{
|
||||
IsPlaying = false;
|
||||
currentBeatmap = null;
|
||||
// This method is most commonly called via Dispose(), which is asynchronous.
|
||||
// Todo: This should not be a thing, but requires framework changes.
|
||||
Schedule(() =>
|
||||
{
|
||||
IsPlaying = false;
|
||||
currentBeatmap = null;
|
||||
|
||||
EndPlayingInternal(currentState);
|
||||
EndPlayingInternal(currentState);
|
||||
});
|
||||
}
|
||||
|
||||
public void WatchUser(int userId)
|
||||
|
|
Loading…
Reference in New Issue