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:
parent
fad3490946
commit
bd5f6d596d
1 changed files with 5 additions and 1 deletions
|
|
@ -308,7 +308,11 @@ struct DSPDemo : public AudioSource,
|
||||||
|
|
||||||
void getNextAudioBlock (const AudioSourceChannelInfo& bufferToFill) override
|
void getNextAudioBlock (const AudioSourceChannelInfo& bufferToFill) override
|
||||||
{
|
{
|
||||||
jassert (bufferToFill.buffer != nullptr);
|
if (bufferToFill.buffer == nullptr)
|
||||||
|
{
|
||||||
|
jassertfalse;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
inputSource->getNextAudioBlock (bufferToFill);
|
inputSource->getNextAudioBlock (bufferToFill);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue