Browse Source

VST2: Fixed a nullptr dereference when a VST2 host is supplying nullptrs to the VST2 processReplacing callback

tags/2021-05-28
hogliux 8 years ago
parent
commit
fa1b74611e
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp

+ 5
- 1
modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp View File

@@ -492,8 +492,12 @@ public:
// copy back any temp channels that may have been used..
for (i = 0; i < numOut; ++i)
if (const FloatType* const chan = tmpBuffers.tempChannels.getUnchecked(i))
{
const FloatType* const chan = tmpBuffers.tempChannels.getUnchecked(i);
if (chan != nullptr && outputs[i] != nullptr)
memcpy (outputs[i], chan, sizeof (FloatType) * (size_t) numSamples);
}
}
}


Loading…
Cancel
Save