diff options
Diffstat (limited to 'desktop-widgets')
-rw-r--r-- | desktop-widgets/mainwindow.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp index 33151efb8..e1ef641dc 100644 --- a/desktop-widgets/mainwindow.cpp +++ b/desktop-widgets/mainwindow.cpp @@ -903,9 +903,9 @@ void MainWindow::setupForAddAndPlan(const char *model) void MainWindow::on_actionReplanDive_triggered() { - if (!plannerStateClean() || !current_dive || !current_dive->dc.model) + if (!plannerStateClean() || !current_dive) return; - else if (strcmp(current_dive->dc.model, "planned dive")) { + else if (!current_dive->dc.model || strcmp(current_dive->dc.model, "planned dive")) { if (QMessageBox::warning(this, tr("Warning"), tr("Trying to replan a dive that's not a planned dive."), QMessageBox::Ok | QMessageBox::Cancel) == QMessageBox::Cancel) return; |