Skip to content
Snippets Groups Projects
Commit 51ee4a8d authored by Aaron Cuevas Lopez's avatar Aaron Cuevas Lopez Committed by kmichaelfox
Browse files

Fix crash when removing source from merger

parent 6a81eb31
No related branches found
No related tags found
No related merge requests found
......@@ -229,20 +229,23 @@ void SignalChainManager::updateVisibleEditors(GenericEditor* activeEditor,
// std::cout << editorArray.size() << " " << t << std::endl;
bool merger;
bool merger = false;
if (editorArray.size() > 0)
{
// take the next processor in the array
GenericProcessor* p2 = (GenericProcessor*) editorArray[0]->getProcessor();
merger = (p2->isMerger() && p2->stillHasSource());
if (merger)
if (p2->isMerger())
{
// std::cout << "We've got a merger!" << std::endl;
//p2->switchIO(0);
p2->setMergerSourceNode(p->getSourceNode());
MergerEditor* me = (MergerEditor*) editorArray[0];
me->switchSource();
if (p2->stillHasSource())
{
MergerEditor* me = static_cast<MergerEditor*>(p2->getEditor());
me->switchSource();
}
// p2->setMergerSourceNode(nullptr);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment