diff options
-rw-r--r-- | desktop-widgets/mainwindow.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp index 0ce5ef648..506878c98 100644 --- a/desktop-widgets/mainwindow.cpp +++ b/desktop-widgets/mainwindow.cpp @@ -953,7 +953,8 @@ void MainWindow::on_actionDivePlanner_triggered() DivePlannerPointsModel::instance()->setupStartTime(); DivePlannerPointsModel::instance()->createSimpleDive(); // plan the dive in the same mode as the currently selected one - divePlannerSettingsWidget()->setDiveMode(current_dive->dc.divemode); + if (current_dive) + divePlannerSettingsWidget()->setDiveMode(current_dive->dc.divemode); DivePictureModel::instance()->updateDivePictures(); divePlannerWidget()->setReplanButton(false); } |