mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-02-05 03:50:07 +00:00
Added an AudioProcessor graph assertion.
This commit is contained in:
parent
14cc8bf3c5
commit
2a4aa982d0
1 changed files with 9 additions and 0 deletions
|
|
@ -965,6 +965,15 @@ AudioProcessorGraph::Node* AudioProcessorGraph::addNode (AudioProcessor* const n
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
for (int i = nodes.size(); --i >= 0;)
|
||||
{
|
||||
if (nodes.getUnchecked(i)->getProcessor() == newProcessor)
|
||||
{
|
||||
jassertfalse; // Cannot add the same object to the graph twice!
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
if (nodeId == 0)
|
||||
{
|
||||
nodeId = ++lastNodeId;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue