added checks to avoid segfaults when closing the application
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@266 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -1563,8 +1563,12 @@ void automationEditor::resizeEvent( QResizeEvent * )
|
||||
|
||||
m_topBottomScroll->setValue( m_scroll_level );
|
||||
|
||||
eng()->getSongEditor()->getPlayPos( songEditor::PLAY_AUTOMATION_PATTERN
|
||||
if( eng()->getSongEditor() )
|
||||
{
|
||||
eng()->getSongEditor()->getPlayPos(
|
||||
songEditor::PLAY_AUTOMATION_PATTERN
|
||||
).m_timeLine->setFixedWidth( width() );
|
||||
}
|
||||
m_toolBar->setFixedWidth( width() );
|
||||
|
||||
updateTopBottomLevels();
|
||||
|
||||
@@ -274,12 +274,17 @@ void notePlayHandle::noteOff( const f_cnt_t _s )
|
||||
FALSE );
|
||||
}
|
||||
// send MIDI-note-off-event
|
||||
m_instrumentTrack->processOutEvent( midiEvent( NOTE_OFF,
|
||||
// TODO: move framesPerTact() to engine
|
||||
if( m_instrumentTrack->eng()->getSongEditor() )
|
||||
{
|
||||
m_instrumentTrack->processOutEvent( midiEvent( NOTE_OFF,
|
||||
m_instrumentTrack->m_midiPort->outputChannel(),
|
||||
key(), 0 ),
|
||||
midiTime::fromFrames(
|
||||
m_framesBeforeRelease,
|
||||
m_instrumentTrack->eng()->getSongEditor()->framesPerTact() ) );
|
||||
m_instrumentTrack->eng()->getSongEditor()
|
||||
->framesPerTact() ) );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user