fix for audio-mixer crash with node from DS

This commit is contained in:
Stephen Birarda 2013-10-18 09:28:36 -07:00
parent 1965ff286b
commit 2fcdd708cb

View file

@ -171,7 +171,8 @@ void AudioMixer::run() {
// loop through all other nodes that have sufficient audio to mix
for (NodeList::iterator otherNode = nodeList->begin(); otherNode != nodeList->end(); otherNode++) {
if (((PositionalAudioRingBuffer*) otherNode->getLinkedData())->willBeAddedToMix()
if (otherNode->getLinkedData()
&& ((PositionalAudioRingBuffer*) otherNode->getLinkedData())->willBeAddedToMix()
&& (otherNode != node || (otherNode == node && nodeRingBuffer->shouldLoopbackForNode()))) {
PositionalAudioRingBuffer* otherNodeBuffer = (PositionalAudioRingBuffer*) otherNode->getLinkedData();
// based on our listen mode we will do this mixing...