diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 0f8fbbae56..6c1982f328 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -398,18 +398,19 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) : } Application::~Application() { + qInstallMessageHandler(NULL); + + saveSettings(); + storeSizeAndPosition(); + saveScripts(); + int DELAY_TIME = 1000; UserActivityLogger::getInstance().close(DELAY_TIME); - qInstallMessageHandler(NULL); - // make sure we don't call the idle timer any more delete idleTimer; - + _sharedVoxelSystem.changeTree(new VoxelTree); - - saveSettings(); - delete _voxelImporter; // let the avatar mixer know we're out @@ -432,8 +433,6 @@ Application::~Application() { _particleEditSender.terminate(); _modelEditSender.terminate(); - storeSizeAndPosition(); - saveScripts(); VoxelTreeElement::removeDeleteHook(&_voxels); // we don't need to do this processing on shutdown Menu::getInstance()->deleteLater();