1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 11:20:04 +08:00

Merge pull request #13251 from smoogipoo/fix-handleframe-crash

Fix HandleFrame crashing when not playing
This commit is contained in:
Dean Herbert 2021-05-31 12:02:23 +09:00 committed by GitHub
commit acd9ed40d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -235,6 +235,9 @@ namespace osu.Game.Online.Spectator
{ {
Debug.Assert(ThreadSafety.IsUpdateThread); Debug.Assert(ThreadSafety.IsUpdateThread);
if (!IsPlaying)
return;
if (frame is IConvertibleReplayFrame convertible) if (frame is IConvertibleReplayFrame convertible)
pendingFrames.Enqueue(convertible.ToLegacy(currentBeatmap)); pendingFrames.Enqueue(convertible.ToLegacy(currentBeatmap));