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]
public void TearDownSteps()
{
if (DebugUtils.IsNUnitRunning)
if (DebugUtils.IsNUnitRunning && Game != null)
{
AddStep("exit game", () => Game.Exit());
AddUntilStep("wait for game exit", () => Game.Parent == null);