diff --git a/src/tracks/SampleTrack.cpp b/src/tracks/SampleTrack.cpp index f754a25138c..e699fb7bfe2 100644 --- a/src/tracks/SampleTrack.cpp +++ b/src/tracks/SampleTrack.cpp @@ -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() ) {