Browse Source

PerformanceTest: Fixed crash when no parameters are passed

Jorrit Rouwe 8 months ago
parent
commit
e101339e9b
1 changed files with 4 additions and 2 deletions
  1. 4 2
      PerformanceTest/PerformanceTest.cpp

+ 4 - 2
PerformanceTest/PerformanceTest.cpp

@@ -217,12 +217,14 @@ int main(int argc, char** argv)
 	// Show used instruction sets
 	Trace(GetConfigurationString());
 
+	// If no scene was specified use the default scene
+	if (scene == nullptr)
+		scene = create_ragdoll_scene();
+
 	// Output scene we're running
 	Trace("Running scene: %s", scene->GetName());
 
 	// Load the scene
-	if (scene == nullptr)
-		scene = create_ragdoll_scene();
 	if (!scene->Load())
 		return 1;