diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 65d9ae1ba7..8dbee51c62 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -696,7 +696,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer) : auto userInputMapper = DependencyManager::get(); connect(userInputMapper.data(), &UserInputMapper::actionEvent, [this](int action, float state) { using namespace controller; - static auto offscreenUi = DependencyManager::get(); + auto offscreenUi = DependencyManager::get(); if (offscreenUi->navigationFocused()) { auto actionEnum = static_cast(action); int key = Qt::Key_unknown; @@ -836,7 +836,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer) : return (float)qApp->getMyAvatar()->getCharacterController()->onGround(); })); _applicationStateDevice->addInputVariant(QString("NavigationFocused"), controller::StateController::ReadLambda([]() -> float { - static auto offscreenUi = DependencyManager::get(); + auto offscreenUi = DependencyManager::get(); return offscreenUi->navigationFocused() ? 1.0 : 0.0; })); @@ -1051,6 +1051,8 @@ void Application::cleanupBeforeQuit() { #ifdef HAVE_IVIEWHMD DependencyManager::destroy(); #endif + + DependencyManager::destroy(); } void Application::emptyLocalCache() { diff --git a/libraries/gl/src/gl/OffscreenQmlSurface.cpp b/libraries/gl/src/gl/OffscreenQmlSurface.cpp index f89f1f5b72..d9e8579d58 100644 --- a/libraries/gl/src/gl/OffscreenQmlSurface.cpp +++ b/libraries/gl/src/gl/OffscreenQmlSurface.cpp @@ -254,7 +254,7 @@ private: _quit = true; } - static const uint64_t MAX_SHUTDOWN_WAIT_SECS = 5; + static const uint64_t MAX_SHUTDOWN_WAIT_SECS = 2; void stop() { if (_thread.isRunning()) { qDebug() << "Stopping QML render thread " << _thread.currentThreadId();