Browse Source

DSPDemos: Avoid undefined behaviour if buffer is null

v6.1.6
reuk 4 years ago
parent
commit
bd5f6d596d
No known key found for this signature in database GPG Key ID: 9ADCD339CFC98A11
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      examples/Assets/DSPDemos_Common.h

+ 5
- 1
examples/Assets/DSPDemos_Common.h 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);


Loading…
Cancel
Save