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
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}
}
}