diff options
author | Florian Jung <flo@windfisch.org> | 2012-01-03 17:26:09 +0000 |
---|---|---|
committer | Florian Jung <flo@windfisch.org> | 2012-01-03 17:26:09 +0000 |
commit | 1bc4ba9dfc00b6e7511fbf4765296a2002f83315 (patch) | |
tree | df6a0d5d9b61d64005dd368afea0aea11ab0a6b3 /muse2/muse/node.cpp | |
parent | b988a0a27bc175ce10bc8fa53ed131486813f3e7 (diff) |
merged with release_2_0
Diffstat (limited to 'muse2/muse/node.cpp')
-rw-r--r-- | muse2/muse/node.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/muse2/muse/node.cpp b/muse2/muse/node.cpp index b6b40738..20440b45 100644 --- a/muse2/muse/node.cpp +++ b/muse2/muse/node.cpp @@ -1851,12 +1851,15 @@ void AudioTrack::setTotalOutChannels(int num) // Number of allocated buffers is always MAX_CHANNELS or more, even if _totalOutChannels is less. if(chans < MAX_CHANNELS) chans = MAX_CHANNELS; - for(int i = 0; i < chans; ++i) - { - if(outBuffers[i]) - free(outBuffers[i]); - } - delete[] outBuffers; + if(outBuffers) + { + for(int i = 0; i < chans; ++i) + { + if(outBuffers[i]) + free(outBuffers[i]); + } + delete[] outBuffers; + } _totalOutChannels = num; chans = num; |