From: Joel Holdsworth Date: Wed, 24 Apr 2013 19:08:24 +0000 (+0100) Subject: Only the open the file if the user clicked ok in the dialog X-Git-Tag: pulseview-0.1.0~19 X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=commitdiff_plain;h=92b139d0889951e1bb90ee0803bdc6999fdf48b0 Only the open the file if the user clicked ok in the dialog --- 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()