diff options
| author | Erik Kundiman <erik@megapahit.org> | 2024-11-06 17:30:47 +0800 |
|---|---|---|
| committer | Erik Kundiman <erik@megapahit.org> | 2024-11-06 17:30:47 +0800 |
| commit | 5f3e7b7fb33160c3250d445f45214aa30130c9e7 (patch) | |
| tree | 35aae8ac630096462d5e2ae1aa37b3787e80de56 /indra/newview/llvoiceclient.cpp | |
| parent | 8af4df0022a484c3ea0b1fedb3a36235e2742e3b (diff) | |
| parent | 55732f7343fa574a8dfcbfd807e69b1fb56e9209 (diff) | |
Merge remote-tracking branch 'secondlife/release/2024.09-ExtraFPS' into 2024.09-ExtraFPS
Diffstat (limited to 'indra/newview/llvoiceclient.cpp')
| -rw-r--r-- | indra/newview/llvoiceclient.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp index 846c2b8867..3d8ffc35e7 100644 --- a/indra/newview/llvoiceclient.cpp +++ b/indra/newview/llvoiceclient.cpp @@ -177,7 +177,11 @@ void LLVoiceClient::init(LLPumpIO *pump) void LLVoiceClient::userAuthorized(const std::string& user_id, const LLUUID &agentID) { - gAgent.addRegionChangedCallback(boost::bind(&LLVoiceClient::onRegionChanged, this)); + if (mRegionChangedCallbackSlot.connected()) + { + mRegionChangedCallbackSlot.disconnect(); + } + mRegionChangedCallbackSlot = gAgent.addRegionChangedCallback(boost::bind(&LLVoiceClient::onRegionChanged, this)); #if !__FreeBSD__ LLWebRTCVoiceClient::getInstance()->userAuthorized(user_id, agentID); #endif @@ -683,9 +687,15 @@ bool LLVoiceClient::voiceEnabled() void LLVoiceClient::setVoiceEnabled(bool enabled) { #if !__FreeBSD__ - LLWebRTCVoiceClient::getInstance()->setVoiceEnabled(enabled); + if (LLWebRTCVoiceClient::instanceExists()) + { + LLWebRTCVoiceClient::getInstance()->setVoiceEnabled(enabled); + } #endif - LLVivoxVoiceClient::getInstance()->setVoiceEnabled(enabled); + if (LLVivoxVoiceClient::instanceExists()) + { + LLVivoxVoiceClient::getInstance()->setVoiceEnabled(enabled); + } } void LLVoiceClient::updateMicMuteLogic() |
