Mercurial > hg > svcore
diff transform/RealTimeEffectModelTransformer.cpp @ 429:6036b38177e2
* Fix crash when running Generator
author | Chris Cannam |
---|---|
date | Wed, 18 Jun 2008 13:40:10 +0000 |
parents | d35d4e79c95b |
children | b6dc6c7f402c |
line wrap: on
line diff
--- a/transform/RealTimeEffectModelTransformer.cpp Tue Jun 17 16:07:56 2008 +0000 +++ b/transform/RealTimeEffectModelTransformer.cpp Wed Jun 18 13:40:10 2008 +0000 @@ -196,15 +196,17 @@ } } } else { - got = input->getData(0, channelCount - 1, - blockFrame, blockSize, - inbufs); - while (got < blockSize) { - for (size_t ch = 0; ch < channelCount; ++ch) { - inbufs[ch][got] = 0.0; + if (inbufs && inbufs[0]) { + got = input->getData(0, channelCount - 1, + blockFrame, blockSize, + inbufs); + while (got < blockSize) { + for (size_t ch = 0; ch < channelCount; ++ch) { + inbufs[ch][got] = 0.0; + } + ++got; } - ++got; - } + } for (size_t ch = channelCount; ch < m_plugin->getAudioInputCount(); ++ch) { for (long i = 0; i < blockSize; ++i) { inbufs[ch][i] = inbufs[ch % channelCount][i];