From d8d053b6e51abf651ca31d0d4822035c06fb7f9b Mon Sep 17 00:00:00 2001 From: Soeren Apel Date: Tue, 6 Jun 2017 19:28:07 +0200 Subject: [PATCH] MainWindow: Don't try to close a session when there is none --- pv/mainwindow.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pv/mainwindow.cpp b/pv/mainwindow.cpp index 9286a06..a20f12a 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?"), -- 2.30.2