From 2b8e82a1f4503ae88ed3f7a97cad74d84c925d33 Mon Sep 17 00:00:00 2001 From: Aimee Linden Date: Thu, 8 Apr 2010 12:37:12 +0100 Subject: Fix-up some breakage from backing out the SLE merge. Was causing a crash on viewer exit if the Voice Control Panel was left open and detached. --- indra/newview/llcallfloater.cpp | 2 +- indra/newview/llvoicechannel.cpp | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) (limited to 'indra') diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index 44f1cefafe..bed5c01d7a 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -133,7 +133,7 @@ LLCallFloater::~LLCallFloater() if(LLVoiceClient::instanceExists()) { - gVoiceClient->removeObserver(this); + LLVoiceClient::instance().removeObserver(this); } LLTransientFloaterMgr::getInstance()->removeControlView(this); } diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index fac7fa6a18..7bb1006e93 100644 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -139,13 +139,10 @@ LLVoiceChannel::LLVoiceChannel(const LLUUID& session_id, const std::string& sess LLVoiceChannel::~LLVoiceChannel() { - // Don't use LLVoiceClient::getInstance() here -- this can get called during atexit() time and that singleton MAY have already been destroyed. - // Using call of instanceExists() instead of gVoiceClient in check to avoid crash in LLVoiceClient::removeObserver() - // when quitting viewer by closing console window before login (though in case of such quit crash will occur - // later in other destructors anyway). EXT-5524 + // Must check instance exists here, the singleton MAY have already been destroyed. if(LLVoiceClient::instanceExists()) { - gVoiceClient->removeObserver(this); + LLVoiceClient::instance().removeObserver(this); } sVoiceChannelMap.erase(mSessionID); -- cgit v1.2.3 From 31e85ba276e17f6198513d1632364b0df955eec0 Mon Sep 17 00:00:00 2001 From: Aimee Linden Date: Thu, 8 Apr 2010 13:09:10 +0100 Subject: Another small fix-up from backing out the SLE merge --- indra/newview/llviewercontrol.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index 6f037177fa..874995a09e 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -413,7 +413,6 @@ bool handleHighResSnapshotChanged(const LLSD& newvalue) bool handleVoiceClientPrefsChanged(const LLSD& newvalue) { - if(LLVoiceClient::getInstance()) LLVoiceClient::getInstance()->updateSettings(); return true; } -- cgit v1.2.3