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:
parent
c6d1828a32
commit
2c0ba080d5
1 changed files with 3 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue