diff options
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/mainwindow.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index 21d36d92f..54c0ce7f2 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -584,9 +584,9 @@ void MainWindow::setupForAddAndPlan(const char *model) void MainWindow::on_actionReplanDive_triggered() { - if (!plannerStateClean()) + if (!plannerStateClean() || !current_dive || !current_dive->dc.model) return; - if (!current_dive || !current_dive->dc.model || strcmp(current_dive->dc.model, "planned dive")) { + else if (strcmp(current_dive->dc.model, "planned dive")) { qDebug() << "trying to replan a dive that's not a planned dive:" << current_dive->dc.model; return; } |