1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 10:03:05 +08:00

Fix potential nullref on OsuGameTestScene.TearDownSteps

This commit is contained in:
Salman Ahmed 2022-03-30 01:15:22 +03:00
parent 30fae452a4
commit 986aad4bd5

View File

@ -74,7 +74,7 @@ namespace osu.Game.Tests.Visual
[TearDownSteps] [TearDownSteps]
public void TearDownSteps() public void TearDownSteps()
{ {
if (DebugUtils.IsNUnitRunning) if (DebugUtils.IsNUnitRunning && Game != null)
{ {
AddStep("exit game", () => Game.Exit()); AddStep("exit game", () => Game.Exit());
AddUntilStep("wait for game exit", () => Game.Parent == null); AddUntilStep("wait for game exit", () => Game.Parent == null);