Browse Source

APVTS: Avoid potential nullptr deref

tags/2021-05-28
reuk Tom Poole 6 years ago
parent
commit
2c0ba080d5
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.cpp

+ 3
- 0
modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.cpp 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());


Loading…
Cancel
Save