1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

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

This commit is contained in:
hogliux 2017-05-11 09:57:05 +01:00
parent c4cf336a56
commit fa1b74611e

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);
}
}
}