changeset 221:50122e9b817e

Avoid starting an action if selection is changed when no document present
author Chris Cannam
date Fri, 07 Mar 2014 10:31:51 +0000
parents 834f7880947e
children 43cc5f7cc554
files src/MainWindow.cpp
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/MainWindow.cpp	Thu Mar 06 15:00:06 2014 -0500
+++ b/src/MainWindow.cpp	Fri Mar 07 10:31:51 2014 +0000
@@ -1818,6 +1818,11 @@
 void
 MainWindow::selectionChangedByUser()
 {
+    if (!m_document) {
+        // we're exiting, most likely
+        return;
+    }
+
     MultiSelection::SelectionList selections = m_viewManager->getSelections();
 
     cerr << "MainWindow::selectionChangedByUser" << endl;