summaryrefslogtreecommitdiff
path: root/indra/newview/llappviewer.cpp
diff options
context:
space:
mode:
authorandreykproductengine <andreykproductengine@lindenlab.com>2018-02-22 15:23:14 +0200
committerandreykproductengine <andreykproductengine@lindenlab.com>2018-02-22 15:23:14 +0200
commit481713000b4b45f2ce6d397aa3326520bbb9da16 (patch)
treea3c9d68a920770773b8ff6a62200cca6b0746ec9 /indra/newview/llappviewer.cpp
parent7e0bbc79ea0237c59b38e78b66f1fee3ca289258 (diff)
MAINT-8183 Fixed some exit issues and crashes
Diffstat (limited to 'indra/newview/llappviewer.cpp')
-rw-r--r--indra/newview/llappviewer.cpp27
1 files changed, 21 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)
{