AutomationPattern copy ctor: null check getTrack (#5943)

Prevents a segfault when attempting to copy construct an automation pattern with no track. Thanks to SeleDreams, Veratil, Dom.
This commit is contained in:
Spekular
2021-03-11 11:49:32 +01:00
committed by GitHub
parent 459948f8cd
commit db37fa1eb2

View File

@@ -92,6 +92,7 @@ AutomationPattern::AutomationPattern( const AutomationPattern & _pat_to_copy ) :
// Copies the automation node (in/out values and in/out tangents)
m_timeMap[POS(it)] = it.value();
}
if (!getTrack()){ return; }
switch( getTrack()->trackContainer()->type() )
{
case TrackContainer::BBContainer: