diff options
Diffstat (limited to 'muse2/muse/master/lmaster.cpp')
-rw-r--r-- | muse2/muse/master/lmaster.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/muse2/muse/master/lmaster.cpp b/muse2/muse/master/lmaster.cpp index bf31cc91..f461e1d3 100644 --- a/muse2/muse/master/lmaster.cpp +++ b/muse2/muse/master/lmaster.cpp @@ -27,6 +27,7 @@ #include "xml.h" #include "song.h" #include "globals.h" +#include "app.h" #include "audio.h" //#include "posedit.h" //#include "sigedit.h" @@ -122,7 +123,9 @@ namespace MusEGui { void LMaster::closeEvent(QCloseEvent* e) { - emit deleted(static_cast<TopWin*>(this)); + _isDeleting = true; // Set flag so certain signals like songChanged, which may cause crash during delete, can be ignored. + + emit isDeleting(static_cast<TopWin*>(this)); e->accept(); } @@ -132,6 +135,9 @@ void LMaster::closeEvent(QCloseEvent* e) void LMaster::songChanged(int type) { + if(_isDeleting) // Ignore while while deleting to prevent crash. + return; + if (type & (SC_SIG | SC_TEMPO | SC_KEY )) updateList(); } @@ -281,6 +287,7 @@ LMaster::LMaster() connect(keyButton, SIGNAL(clicked()), SLOT(insertKey())); initShortcuts(); + MusEGlobal::muse->topwinMenuInited(this); } //--------------------------------------------------------- |