mirror of https://github.com/ppy/osu
Add null check in `TestPlayer`'s disposal code to avoid cascading test failure
This commit is contained in:
parent
961f5d4acc
commit
106932b906
|
@ -110,7 +110,7 @@ protected override void Dispose(bool isDisposing)
|
|||
// 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue