From 35b4c44e9a03f23b500fe39cf6c5d378a196ae6b Mon Sep 17 00:00:00 2001 From: Dale Glass Date: Sat, 11 Nov 2023 16:45:28 +0100 Subject: [PATCH] Delay initializing shared pointers --- interface/src/Application.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 042a065a79..f03ce82b1a 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -1007,9 +1007,6 @@ Application::Application( _logger(new FileLogger(this)), #endif _previousSessionCrashed(setupEssentials(parser, false)), - _entitySimulation(std::make_shared()), - _physicsEngine(std::make_shared(Vectors::ZERO)), - _entityClipboard(std::make_shared()), _previousScriptLocation("LastScriptLocation", DESKTOP_LOCATION), _fieldOfView("fieldOfView", DEFAULT_FIELD_OF_VIEW_DEGREES), _hmdTabletScale("hmdTabletScale", DEFAULT_HMD_TABLET_SCALE_PERCENT), @@ -1046,6 +1043,13 @@ void Application::initialize(const QCommandLineParser &parser) { //setupEssentials(parser, _previousSessionCrashed); qCDebug(interfaceapp) << "Initializing application"; + _entitySimulation = std::make_shared(); + _physicsEngine = std::make_shared(Vectors::ZERO); + _entityClipboard = std::make_shared(); + + + + auto steamClient = PluginManager::getInstance()->getSteamClientPlugin(); setProperty(hifi::properties::STEAM, (steamClient && steamClient->isRunning()));