mirror of
https://github.com/ppy/osu
synced 2025-02-27 16:11:43 +00:00
Fix EndPlaying potentially doing cross-thread mutation
This commit is contained in:
parent
2fdf8aa1aa
commit
7f712a4d04
@ -167,10 +167,15 @@ namespace osu.Game.Online.Spectator
|
|||||||
|
|
||||||
public void EndPlaying()
|
public void EndPlaying()
|
||||||
{
|
{
|
||||||
IsPlaying = false;
|
// This method is most commonly called via Dispose(), which is asynchronous.
|
||||||
currentBeatmap = null;
|
// 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)
|
public void WatchUser(int userId)
|
||||||
|
Loading…
Reference in New Issue
Block a user