fix crash when no audio mixer available

This commit is contained in:
ZappoMan 2013-05-29 08:25:30 -07:00
parent 6b1d37599c
commit eb675c8dd7

View file

@ -58,7 +58,10 @@ void* AudioInjectionManager::injectAudioViaThread(void* args) {
// if we don't have an explicit destination socket then pull active socket for current audio mixer from agent list
if (!_isDestinationSocketExplicit) {
_destinationSocket = *AgentList::getInstance()->soloAgentOfType(AGENT_TYPE_AUDIO_MIXER)->getActiveSocket();
Agent* audioMixer = AgentList::getInstance()->soloAgentOfType(AGENT_TYPE_AUDIO_MIXER);
if (audioMixer) {
_destinationSocket = *audioMixer->getActiveSocket();
}
}
injector->injectAudio(_injectorSocket, &_destinationSocket);