From: Soeren Apel Date: Tue, 6 Jun 2017 17:28:07 +0000 (+0200) Subject: MainWindow: Don't try to close a session when there is none X-Git-Tag: pulseview-0.4.0~23 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=d8d053b6e51abf651ca31d0d4822035c06fb7f9b;p=pulseview.git MainWindow: Don't try to close a session when there is none --- diff --git a/pv/mainwindow.cpp b/pv/mainwindow.cpp index 9286a06c..a20f12a6 100644 --- a/pv/mainwindow.cpp +++ b/pv/mainwindow.cpp @@ -724,7 +724,8 @@ void MainWindow::on_tab_close_requested(int index) { shared_ptr 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?"),