]> sigrok.org Git - pulseview.git/commitdiff
MainWindow: Don't try to close a session when there is none
authorSoeren Apel <redacted>
Tue, 6 Jun 2017 17:28:07 +0000 (19:28 +0200)
committerSoeren Apel <redacted>
Tue, 6 Jun 2017 17:28:07 +0000 (19:28 +0200)
pv/mainwindow.cpp

index 9286a06cea256bae5d24d51d930658bd5fd99167..a20f12a6712a087522ab45d6d770e0fba668fe03 100644 (file)
@@ -724,7 +724,8 @@ void MainWindow::on_tab_close_requested(int index)
 {
        shared_ptr<Session> session = get_tab_session(index);
 
-       assert(session);
+       if (!session)
+               return;
 
        if (session->data_saved() || (QMessageBox::question(this, tr("Confirmation"),
                tr("This session contains unsaved data. Close it anyway?"),