| @@ -432,7 +432,7 @@ void AudioProcessor::setParameterNotifyingHost (int parameterIndex, float newVal | |||||
| { | { | ||||
| param->setValueNotifyingHost (newValue); | param->setValueNotifyingHost (newValue); | ||||
| } | } | ||||
| else | |||||
| else if (isPositiveAndBelow (parameterIndex, getNumParameters())) | |||||
| { | { | ||||
| setParameter (parameterIndex, newValue); | setParameter (parameterIndex, newValue); | ||||
| sendParamChangeMessageToListeners (parameterIndex, newValue); | sendParamChangeMessageToListeners (parameterIndex, newValue); | ||||
| @@ -522,7 +522,8 @@ String AudioProcessor::getParameterName (int index, int maximumStringLength) | |||||
| if (auto* p = managedParameters[index]) | if (auto* p = managedParameters[index]) | ||||
| return p->getName (maximumStringLength); | return p->getName (maximumStringLength); | ||||
| return getParameterName (index).substring (0, maximumStringLength); | |||||
| return isPositiveAndBelow (index, getNumParameters()) ? getParameterName (index).substring (0, maximumStringLength) | |||||
| : String(); | |||||
| } | } | ||||
| const String AudioProcessor::getParameterText (int index) | const String AudioProcessor::getParameterText (int index) | ||||
| @@ -534,7 +535,8 @@ const String AudioProcessor::getParameterText (int index) | |||||
| ScopedValueSetter<bool> sv (textRecursionCheck, true, false); | ScopedValueSetter<bool> sv (textRecursionCheck, true, false); | ||||
| #endif | #endif | ||||
| return getParameterText (index, 1024); | |||||
| return isPositiveAndBelow (index, getNumParameters()) ? getParameterText (index, 1024) | |||||
| : String(); | |||||
| } | } | ||||
| String AudioProcessor::getParameterText (int index, int maximumStringLength) | String AudioProcessor::getParameterText (int index, int maximumStringLength) | ||||
| @@ -542,7 +544,8 @@ String AudioProcessor::getParameterText (int index, int maximumStringLength) | |||||
| if (auto* p = managedParameters[index]) | if (auto* p = managedParameters[index]) | ||||
| return p->getText (p->getValue(), maximumStringLength); | return p->getText (p->getValue(), maximumStringLength); | ||||
| return getParameterText (index).substring (0, maximumStringLength); | |||||
| return isPositiveAndBelow (index, getNumParameters()) ? getParameterText (index).substring (0, maximumStringLength) | |||||
| : String(); | |||||
| } | } | ||||
| #if JUCE_GCC | #if JUCE_GCC | ||||