when freeing instrument-window, also free view immediately - fixes crash when removing instrument-track while instrument-track window was open

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1076 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Tobias Doerffel
2008-06-05 17:25:49 +00:00
parent 112e932dd8
commit 7a9e20f1b7

View File

@@ -200,7 +200,7 @@ void instrumentTrack::processAudioBuffer( sampleFrame * _buf,
_n->framesLeftForCurrentPeriod(), _frames ) :
_frames,
( _n != NULL ) ? _n->offset() : 0,
panningToVolumeVector( m_panningModel.value(),
panningToVolumeVector( (int) m_panningModel.value(),
v_scale ),
&m_audioPort );
}
@@ -926,10 +926,11 @@ void instrumentTrackView::freeInstrumentTrackWindow( void )
{
if( s_windows.count() < INSTRUMENT_WINDOW_CACHE_SIZE )
{
m_window->parentWidget()->hide();
m_window->setModel(
engine::getDummyTrackContainer()->
dummyInstrumentTrack() );
m_window->parentWidget()->hide();
m_window->updateInstrumentView();
s_windows.enqueue( m_window );
}
else