added checks to avoid segfaults when closing the application
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@269 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -296,6 +296,8 @@ private:
|
||||
|
||||
track * m_automation_track;
|
||||
|
||||
bool m_destroyed;
|
||||
|
||||
|
||||
|
||||
enum ACTIONS
|
||||
|
||||
@@ -226,7 +226,7 @@ void note::saveSettings( QDomDocument & _doc, QDomElement & _this )
|
||||
_this.setAttribute( "pan", m_panning );
|
||||
_this.setAttribute( "len", m_length );
|
||||
_this.setAttribute( "pos", m_pos );
|
||||
if( m_length > 0 )
|
||||
if( m_length > 0 && m_detuning )
|
||||
{
|
||||
m_detuning->saveSettings( _doc, _this, "detuning" );
|
||||
}
|
||||
|
||||
@@ -113,7 +113,8 @@ songEditor::songEditor( engine * _engine ) :
|
||||
m_trackToPlay( NULL ),
|
||||
m_patternToPlay( NULL ),
|
||||
m_loopPattern( FALSE ),
|
||||
m_scrollBack( FALSE )
|
||||
m_scrollBack( FALSE ),
|
||||
m_destroyed( FALSE )
|
||||
{
|
||||
setWindowTitle( tr( "Song-Editor" ) );
|
||||
setWindowIcon( embed::getIconPixmap( "songeditor" ) );
|
||||
@@ -446,6 +447,7 @@ songEditor::songEditor( engine * _engine ) :
|
||||
songEditor::~songEditor()
|
||||
{
|
||||
delete m_automation_track;
|
||||
m_destroyed = TRUE;
|
||||
}
|
||||
|
||||
|
||||
@@ -1199,6 +1201,10 @@ void songEditor::updateTimeLinePosition( void )
|
||||
|
||||
void songEditor::stop( void )
|
||||
{
|
||||
if( m_destroyed )
|
||||
{
|
||||
return;
|
||||
}
|
||||
m_actions.push_back( ACT_STOP_PLAY );
|
||||
#ifdef QT4
|
||||
m_playButton->setIcon( embed::getIconPixmap( "play" ) );
|
||||
|
||||
Reference in New Issue
Block a user