diff --git a/examples/BLOCKS/BlocksMonitorDemo.h b/examples/BLOCKS/BlocksMonitorDemo.h index 02e979d93f..2e17964d32 100644 --- a/examples/BLOCKS/BlocksMonitorDemo.h +++ b/examples/BLOCKS/BlocksMonitorDemo.h @@ -645,7 +645,7 @@ public: auto numBlockComponents = blockComponents.size(); // If there are no currently connected Blocks then display some text on the screen - if (numBlockComponents == 0) + if (masterBlockComponent == nullptr || numBlockComponents == 0) { noBlocksLabel.setVisible (true); noBlocksLabel.setBounds (0, (getHeight() / 2) - 50, getWidth(), 100); @@ -795,6 +795,9 @@ private: /** Calculates the position and rotation of each connected Block relative to the master Block */ void positionBlocks (BlockTopology topology) { + if (masterBlockComponent == nullptr) + return; + Array blocksConnectedToMaster; auto maxDelta = std::numeric_limits::max(); diff --git a/examples/BLOCKS/BlocksSynthDemo.h b/examples/BLOCKS/BlocksSynthDemo.h index 69c6698191..56b5122025 100644 --- a/examples/BLOCKS/BlocksSynthDemo.h +++ b/examples/BLOCKS/BlocksSynthDemo.h @@ -411,7 +411,7 @@ public: } else { - if (squareWaveY[x - 1] == 1) + if (x > 0 && squareWaveY[x - 1] == 1) squareWaveY[x - 1] = 255; squareWaveY[x] = 13; diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessor.cpp b/modules/juce_audio_processors/processors/juce_AudioProcessor.cpp index bd40623c53..5443351af5 100644 --- a/modules/juce_audio_processors/processors/juce_AudioProcessor.cpp +++ b/modules/juce_audio_processors/processors/juce_AudioProcessor.cpp @@ -364,6 +364,7 @@ void AudioProcessor::setPlayConfigDetails (int newNumIns, int newNumOuts, double jassert (success && newNumIns == getTotalNumInputChannels() && newNumOuts == getTotalNumOutputChannels()); setRateAndBufferSizeDetails (newSampleRate, newBlockSize); + ignoreUnused (success); } void AudioProcessor::setRateAndBufferSizeDetails (double newSampleRate, int newBlockSize) noexcept