1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-16 00:34:19 +00:00

APVTS: Avoid potential nullptr deref

This commit is contained in:
reuk 2019-05-17 22:45:19 +01:00 committed by Tom Poole
parent c6d1828a32
commit 2c0ba080d5

View file

@ -276,6 +276,9 @@ RangedAudioParameter* AudioProcessorValueTreeState::createAndAddParameter (const
RangedAudioParameter* AudioProcessorValueTreeState::createAndAddParameter (std::unique_ptr<RangedAudioParameter> param)
{
if (param == nullptr)
return nullptr;
// All parameters must be created before giving this manager a ValueTree state!
jassert (! state.isValid());