diff --git a/3rdParty/JUCE b/3rdParty/JUCE index df3b49f..76910b0 160000 --- a/3rdParty/JUCE +++ b/3rdParty/JUCE @@ -1 +1 @@ -Subproject commit df3b49fbd35655ed2530e77e005034d87987c765 +Subproject commit 76910b0ebd7fd00d7d03b64beb6f5c96746cf8ce diff --git a/Source/PluginProcessor.cpp b/Source/PluginProcessor.cpp index 97c1f4b..f136923 100644 --- a/Source/PluginProcessor.cpp +++ b/Source/PluginProcessor.cpp @@ -1027,10 +1027,15 @@ void DdrmtimbreSpaceAudioProcessor::handleIncomingMidiMessage(MidiInput* source, // Set parameter value from MIDI message const ScopedValueSetter scopedInputFlag (isReceivingFromMidiInput, true); float newValue = (float)ccValue/127.0; - const String parameterID = ddrmInterface->getParameterIDFromCCNumber(ccNumber); - parameters.getParameter(parameterID)->beginChangeGesture(); - parameters.getParameter(parameterID)->setValueNotifyingHost(newValue); // setValueNotifyingHost takes norm values from [0.0..1.0] - parameters.getParameter(parameterID)->endChangeGesture(); + try { + const String parameterID = ddrmInterface->getParameterIDFromCCNumber(ccNumber); + parameters.getParameter(parameterID)->beginChangeGesture(); + parameters.getParameter(parameterID)->setValueNotifyingHost(newValue); // setValueNotifyingHost takes norm values from [0.0..1.0] + parameters.getParameter(parameterID)->endChangeGesture(); + } catch (...) { + // The above will raise if the ccNumber does not correpsond to any DDRM number. + // We should no nothing in this case. This try/catch will avoid app crashing. + } } } }