diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llappviewer.cpp | 27 | ||||
-rw-r--r-- | indra/newview/llmeshrepository.cpp | 12 |
2 files changed, 33 insertions, 6 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index a0750214a8..85e94d57e8 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1645,7 +1645,10 @@ bool LLAppViewer::cleanup() LLEventPumps::instance().reset(); //dump scene loading monitor results - LLSceneMonitor::instance().dumpToFile(gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "scene_monitor_results.csv")); + if (LLSceneMonitor::instanceExists()) + { + LLSceneMonitor::instance().dumpToFile(gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "scene_monitor_results.csv")); + } // There used to be an 'if (LLFastTimerView::sAnalyzePerformance)' block // here, completely redundant with the one that occurs later in this same @@ -1687,8 +1690,11 @@ bool LLAppViewer::cleanup() // Give any remaining SLPlugin instances a chance to exit cleanly. LLPluginProcessParent::shutdown(); - LLVoiceClient::getInstance()->terminate(); - + if (LLVoiceClient::instanceExists()) + { + LLVoiceClient::getInstance()->terminate(); + } + disconnectViewer(); LL_INFOS() << "Viewer disconnected" << LL_ENDL; @@ -1743,7 +1749,10 @@ bool LLAppViewer::cleanup() // Note: this is where gLocalSpeakerMgr and gActiveSpeakerMgr used to be deleted. - LLWorldMap::getInstance()->reset(); // release any images + if (LLWorldMap::instanceExists()) + { + LLWorldMap::getInstance()->reset(); // release any images + } LLCalc::cleanUp(); @@ -1916,10 +1925,16 @@ bool LLAppViewer::cleanup() LLURLHistory::saveFile("url_history.xml"); // save mute list. gMuteList used to also be deleted here too. - LLMuteList::getInstance()->cache(gAgent.getID()); + if (gAgent.isInitialized() && LLMuteList::instanceExists()) + { + LLMuteList::getInstance()->cache(gAgent.getID()); + } //save call log list - LLConversationLog::instance().cache(); + if (LLConversationLog::instanceExists()) + { + LLConversationLog::instance().cache(); + } if (mPurgeOnExit) { diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index 69e69b134a..f1c2234677 100644 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -836,6 +836,12 @@ LLMeshRepoThread::~LLMeshRepoThread() mHttpRequestSet.clear(); mHttpHeaders.reset(); + while (!mDecompositionQ.empty()) + { + delete mDecompositionQ.front(); + mDecompositionQ.pop_front(); + } + delete mHttpRequest; mHttpRequest = NULL; delete mMutex; @@ -1941,6 +1947,9 @@ LLMeshUploadThread::~LLMeshUploadThread() { delete mHttpRequest; mHttpRequest = NULL; + delete mMutex; + mMutex = NULL; + } LLMeshUploadThread::DecompRequest::DecompRequest(LLModel* mdl, LLModel* base_model, LLMeshUploadThread* thread) @@ -3321,6 +3330,7 @@ void LLMeshPhysicsShapeHandler::processData(LLCore::BufferArray * /* body */, S3 LLMeshRepository::LLMeshRepository() : mMeshMutex(NULL), + mDecompThread(NULL), mMeshThreadCount(0), mThread(NULL) { @@ -3350,6 +3360,8 @@ void LLMeshRepository::init() void LLMeshRepository::shutdown() { LL_INFOS(LOG_MESH) << "Shutting down mesh repository." << LL_ENDL; + llassert(mThread != NULL); + llassert(mThread->mSignal != NULL); metrics_teleport_started_signal.disconnect(); |