fix exception when destruction occurs before game has been initialized
This commit is contained in:
@@ -312,7 +312,7 @@ namespace Torch
|
||||
|
||||
private void Destroy()
|
||||
{
|
||||
_game.Dispose();
|
||||
_game?.Dispose();
|
||||
_game = null;
|
||||
|
||||
MyGameService.ShutDown();
|
||||
@@ -462,6 +462,7 @@ namespace Torch
|
||||
public void SignalDestroy()
|
||||
{
|
||||
_destroyGame = true;
|
||||
if (_game is not null)
|
||||
SignalStop();
|
||||
_commandChanged.Set();
|
||||
}
|
||||
|
Reference in New Issue
Block a user