diff --git a/include/song_editor.h b/include/song_editor.h index e156313c6..1ad54054d 100644 --- a/include/song_editor.h +++ b/include/song_editor.h @@ -296,6 +296,8 @@ private: track * m_automation_track; + bool m_destroyed; + enum ACTIONS diff --git a/src/core/note.cpp b/src/core/note.cpp index 65e8259aa..18792e153 100644 --- a/src/core/note.cpp +++ b/src/core/note.cpp @@ -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" ); } diff --git a/src/core/song_editor.cpp b/src/core/song_editor.cpp index a20e4c2aa..c530f392c 100644 --- a/src/core/song_editor.cpp +++ b/src/core/song_editor.cpp @@ -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" ) );