]> sigrok.org Git - pulseview.git/commitdiff
Only the open the file if the user clicked ok in the dialog
authorJoel Holdsworth <redacted>
Wed, 24 Apr 2013 19:08:24 +0000 (20:08 +0100)
committerJoel Holdsworth <redacted>
Wed, 24 Apr 2013 19:08:24 +0000 (20:08 +0100)
pv/mainwindow.cpp

index fc5872875ef6ace5f44af61e3f964168d3a7bd64..f95cd45123eb1345f56a65160ed7b6268d3b7d18 100644 (file)
@@ -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()