summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/divelogimportdialog.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/qt-ui/divelogimportdialog.cpp b/qt-ui/divelogimportdialog.cpp
index c79b9df95..ca3a2bec5 100644
--- a/qt-ui/divelogimportdialog.cpp
+++ b/qt-ui/divelogimportdialog.cpp
@@ -526,7 +526,7 @@ void DiveLogImportDialog::on_buttonBox_accepted()
if (ui->knownImports->currentText() != "Manual import") {
for (int i = 0; i < fileNames.size(); ++i) {
if (ui->knownImports->currentText() == "Seabear CSV") {
- parse_seabear_csv_file(fileNames[i].toUtf8().data(),
+ if (parse_seabear_csv_file(fileNames[i].toUtf8().data(),
r.indexOf(tr("Sample time")),
r.indexOf(tr("Sample depth")),
r.indexOf(tr("Sample temperature")),
@@ -539,7 +539,8 @@ void DiveLogImportDialog::on_buttonBox_accepted()
ui->CSVSeparator->currentIndex(),
specialCSV.contains(ui->knownImports->currentIndex()) ? CSVApps[ui->knownImports->currentIndex()].name.toUtf8().data() : "csv",
ui->CSVUnits->currentIndex()
- );
+ ) < 0)
+ return;
// Seabear CSV stores NDL and TTS in Minutes, not seconds
struct dive *dive = dive_table.dives[dive_table.nr - 1];