check if audio mixer is alive before packet send

This commit is contained in:
Stephen Birarda 2015-07-16 15:49:15 -07:00
parent c5047ec76d
commit a6641908fb

View file

@ -238,10 +238,12 @@ void AudioInjector::injectToMixer() {
// grab our audio mixer from the NodeList, if it exists
SharedNodePointer audioMixer = nodeList->soloNodeOfType(NodeType::AudioMixer);
// send off this audio packet
nodeList->sendUnreliablePacket(*audioPacket, *audioMixer);
outgoingInjectedAudioSequenceNumber++;
if (audioMixer) {
// send off this audio packet
nodeList->sendUnreliablePacket(*audioPacket, *audioMixer);
outgoingInjectedAudioSequenceNumber++;
}
_currentSendPosition += bytesToCopy;