Skip to content

Commit fd0f685

Browse files
Fixed to prevent NREs on game startup
1 parent 455e2ae commit fd0f685

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

SkipSplashScreenProject/SkipSplashScreenPlugin.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ public void Start()
2323

2424
public void Update()
2525
{
26-
var gameState = GameManager.Instance?.Game.GlobalGameState?.GetState();
26+
var gameState = GameManager.Instance?.Game?.GlobalGameState?.GetState();
2727

2828
if (gameState == null)
2929
return;
3030

31-
if (GameManager.Instance.Game.GlobalGameState.GetState() == GameState.MainMenu)
31+
if (GameManager.Instance?.Game?.GlobalGameState?.GetState() == GameState.MainMenu)
3232
Destroy(this);
3333
}
3434

0 commit comments

Comments
 (0)