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

Add null check in TestPlayer's disposal code to avoid cascading test failure

This commit is contained in:
Dean Herbert 2022-08-09 18:15:50 +09:00
parent 961f5d4acc
commit 106932b906

View File

@ -110,7 +110,7 @@ namespace osu.Game.Tests.Visual
// Specific to tests, the player can be disposed without OnExiting() ever being called.
// We should make sure that the gameplay session has finished even in this case.
if (LoadedBeatmapSuccessfully)
spectatorClient.EndPlaying(GameplayState);
spectatorClient?.EndPlaying(GameplayState);
}
}
}