changeset 975:d5404b8421b4

Fix some potential null derefs (from coverity scan)
author Chris Cannam
date Wed, 03 Sep 2014 11:26:21 +0100
parents 65494d0d9ded
children 45e95de8b11d
files transform/RealTimeEffectModelTransformer.cpp
diffstat 1 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/transform/RealTimeEffectModelTransformer.cpp	Wed Sep 03 11:22:46 2014 +0100
+++ b/transform/RealTimeEffectModelTransformer.cpp	Wed Sep 03 11:26:21 2014 +0100
@@ -196,10 +196,10 @@
                 while (got < blockSize) {
                     inbufs[0][got++] = 0.0;
                 }          
-            }
-            for (int ch = 1; ch < (int)m_plugin->getAudioInputCount(); ++ch) {
-                for (long i = 0; i < blockSize; ++i) {
-                    inbufs[ch][i] = inbufs[0][i];
+                for (int ch = 1; ch < (int)m_plugin->getAudioInputCount(); ++ch) {
+                    for (long i = 0; i < blockSize; ++i) {
+                        inbufs[ch][i] = inbufs[0][i];
+                    }
                 }
             }
 	} else {
@@ -213,10 +213,10 @@
                     }
                     ++got;
                 }
-            }
-            for (int ch = channelCount; ch < (int)m_plugin->getAudioInputCount(); ++ch) {
-                for (long i = 0; i < blockSize; ++i) {
-                    inbufs[ch][i] = inbufs[ch % channelCount][i];
+                for (int ch = channelCount; ch < (int)m_plugin->getAudioInputCount(); ++ch) {
+                    for (long i = 0; i < blockSize; ++i) {
+                        inbufs[ch][i] = inbufs[ch % channelCount][i];
+                    }
                 }
             }
 	}