From 92b139d0889951e1bb90ee0803bdc6999fdf48b0 Mon Sep 17 00:00:00 2001 From: Joel Holdsworth Date: Wed, 24 Apr 2013 20:08:24 +0100 Subject: [PATCH] Only the open the file if the user clicked ok in the dialog --- pv/mainwindow.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pv/mainwindow.cpp b/pv/mainwindow.cpp index fc587287..f95cd451 100644 --- a/pv/mainwindow.cpp +++ b/pv/mainwindow.cpp @@ -251,7 +251,8 @@ void MainWindow::on_actionOpen_triggered() const QString file_name = QFileDialog::getOpenFileName( this, tr("Open File"), "", tr("Sigrok Sessions (*.sr)")); - load_file(file_name); + if (!file_name.isEmpty()) + load_file(file_name); } void MainWindow::on_actionConnect_triggered() -- 2.30.2