From dae57b6ce1e18b42a1d1c68cf76b8e2a3b0ea7c1 Mon Sep 17 00:00:00 2001 From: James Ball Date: Tue, 30 Jan 2024 20:15:56 +0000 Subject: [PATCH] Add audio thread callback in null check --- Source/PluginProcessor.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/PluginProcessor.cpp b/Source/PluginProcessor.cpp index a8d65b5..998ee43 100644 --- a/Source/PluginProcessor.cpp +++ b/Source/PluginProcessor.cpp @@ -668,7 +668,9 @@ void OscirenderAudioProcessor::processBlock(juce::AudioBuffer& buffer, ju // used for any callback that must guarantee all audio is recieved (e.g. when recording to a file) juce::SpinLock::ScopedLockType lock(audioThreadCallbackLock); - audioThreadCallback(buffer); + if (audioThreadCallback != nullptr) { + audioThreadCallback(buffer); + } } //==============================================================================