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

DSPDemos: Avoid undefined behaviour if buffer is null

This commit is contained in:
reuk 2021-09-28 17:44:14 +01:00
parent fad3490946
commit bd5f6d596d
No known key found for this signature in database
GPG key ID: 9ADCD339CFC98A11

View file

@ -308,7 +308,11 @@ struct DSPDemo : public AudioSource,
void getNextAudioBlock (const AudioSourceChannelInfo& bufferToFill) override
{
jassert (bufferToFill.buffer != nullptr);
if (bufferToFill.buffer == nullptr)
{
jassertfalse;
return;
}
inputSource->getNextAudioBlock (bufferToFill);