Add null check.

This commit is contained in:
Jean-Baptiste Perrier
2021-05-21 18:18:11 +02:00
parent 320a1a984e
commit 3a68e2891e

View File

@@ -232,7 +232,7 @@ void ManagedEditor::Init()
args[0] = &isHeadless;
args[1] = &skipCompile;
Guid sceneId;
if (CommandLine::Options.Game.HasValue() && Guid::Parse(CommandLine::Options.Game.GetValue(), sceneId))
if (!CommandLine::Options.Game.HasValue() || (CommandLine::Options.Game.HasValue() && Guid::Parse(CommandLine::Options.Game.GetValue(), sceneId)))
{
sceneId = Guid::Empty;
}