fix crash on export per command line with sample track (#3341)

This commit is contained in:
Steffen Baranowsky
2017-02-11 18:58:06 +01:00
committed by GitHub
parent 4413b6f75b
commit f93735755b

View File

@@ -74,7 +74,10 @@ SampleTCO::SampleTCO( Track * _track ) :
//care about positionmarker
TimeLineWidget * timeLine = Engine::getSong()->getPlayPos( Engine::getSong()->Mode_PlaySong ).m_timeLine;
connect( timeLine, SIGNAL( positionMarkerMoved() ), this, SLOT( playbackPositionChanged() ) );
if( timeLine )
{
connect( timeLine, SIGNAL( positionMarkerMoved() ), this, SLOT( playbackPositionChanged() ) );
}
//care about loops
connect( Engine::getSong(), SIGNAL( updateSampleTracks() ), this, SLOT( playbackPositionChanged() ) );
//care about mute TCOs
@@ -84,7 +87,10 @@ SampleTCO::SampleTCO( Track * _track ) :
//care about TCO position
connect( this, SIGNAL( positionChanged() ), this, SLOT( updateTrackTcos() ) );
//playbutton clicked or space key
connect( gui->songEditor(), SIGNAL( playTriggered() ), this, SLOT( playbackPositionChanged() ) );
if( gui )
{
connect( gui->songEditor(), SIGNAL( playTriggered() ), this, SLOT( playbackPositionChanged() ) );
}
switch( getTrack()->trackContainer()->type() )
{