summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorandreykproductengine <andreykproductengine@lindenlab.com>2019-09-04 16:32:54 +0300
committerandreykproductengine <andreykproductengine@lindenlab.com>2019-09-04 16:32:54 +0300
commit05dee4c10b248dfd646bde8dcf9e7c68709adc4d (patch)
treeaf77f987c0b2edfaa2b9073afc4985731d054214 /indra
parente439f0366fffe336ad42c09596427ef35596992c (diff)
SL-11865 Fixed weird existance check
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llvieweraudio.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/indra/newview/llvieweraudio.cpp b/indra/newview/llvieweraudio.cpp
index f81c89f898..cb20801756 100644
--- a/indra/newview/llvieweraudio.cpp
+++ b/indra/newview/llvieweraudio.cpp
@@ -465,22 +465,23 @@ void audio_update_volume(bool force_update)
media_volume = mute_volume * master_volume * media_volume;
LLViewerMedia::getInstance()->setVolume( media_muted ? 0.0f : media_volume );
- // Voice
- if (LLVoiceClient::getInstance())
+ // Voice, this is parametric singleton, it gets initialized when ready
+ if (LLVoiceClient::instanceExists())
{
F32 voice_volume = gSavedSettings.getF32("AudioLevelVoice");
voice_volume = mute_volume * master_volume * voice_volume;
BOOL voice_mute = gSavedSettings.getBOOL("MuteVoice");
- LLVoiceClient::getInstance()->setVoiceVolume(voice_mute ? 0.f : voice_volume);
- LLVoiceClient::getInstance()->setMicGain(voice_mute ? 0.f : gSavedSettings.getF32("AudioLevelMic"));
+ LLVoiceClient *voice_inst = LLVoiceClient::getInstance();
+ voice_inst->setVoiceVolume(voice_mute ? 0.f : voice_volume);
+ voice_inst->setMicGain(voice_mute ? 0.f : gSavedSettings.getF32("AudioLevelMic"));
if (!gViewerWindow->getActive() && (gSavedSettings.getBOOL("MuteWhenMinimized")))
{
- LLVoiceClient::getInstance()->setMuteMic(true);
+ voice_inst->setMuteMic(true);
}
else
{
- LLVoiceClient::getInstance()->setMuteMic(false);
+ voice_inst->setMuteMic(false);
}
}
}