Properly handle removal of a track's active sequence.
This commit is contained in:
parent
d84383c704
commit
b25c206ceb
|
@ -78,6 +78,9 @@ Sequence::~Sequence ( )
|
|||
|
||||
if ( _widgets.size() )
|
||||
FATAL( "programming error: leaf destructor must call Sequence::clear()!" );
|
||||
|
||||
if ( parent() )
|
||||
parent()->remove( this );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -490,6 +490,17 @@ Track::remove ( Audio_Sequence *t )
|
|||
|
||||
timeline->wrlock();
|
||||
|
||||
if ( sequence() == t )
|
||||
{
|
||||
pack->remove( t );
|
||||
|
||||
if ( takes->children() )
|
||||
sequence( (Audio_Sequence*)takes->child( 0 ) );
|
||||
else
|
||||
/* FIXME: should this ever happen? */
|
||||
_sequence = NULL;
|
||||
}
|
||||
else
|
||||
takes->remove( t );
|
||||
|
||||
/* delete t; */
|
||||
|
|
Loading…
Reference in New Issue