diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 11e4f83dc6..83a7dcb354 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -583,15 +583,18 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo bool wantsSandboxRunning = shouldRunServer(); static bool determinedSandboxState = false; + static bool sandboxIsRunning = false; SandboxUtils sandboxUtils; sandboxUtils.ifLocalSandboxRunningElse([&]() { qCDebug(interfaceapp) << "Home sandbox appears to be running....."; determinedSandboxState = true; + sandboxIsRunning = true; }, [&, wantsSandboxRunning]() { qCDebug(interfaceapp) << "Home sandbox does not appear to be running...."; if (wantsSandboxRunning) { QString contentPath = getRunServerPath(); SandboxUtils::runLocalSandbox(contentPath, true, RUNNING_MARKER_FILENAME); + sandboxIsRunning = true; } determinedSandboxState = true; }); @@ -1328,7 +1331,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo const QString TUTORIAL_PATH = "/tutorial_begin"; if (shouldGoToTutorial) { - if(determinedSandboxState) { + if(sandboxIsRunning) { qCDebug(interfaceapp) << "Home sandbox appears to be running, going to Home."; DependencyManager::get()->goToLocalSandbox(TUTORIAL_PATH); } else { @@ -1353,7 +1356,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo // If this is a first run we short-circuit the address passed in if (isFirstRun) { if (hasHMDAndHandControllers) { - if(determinedSandboxState) { + if(sandboxIsRunning) { qCDebug(interfaceapp) << "Home sandbox appears to be running, going to Home."; DependencyManager::get()->goToLocalSandbox(); } else {