mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-17 21:06:17 +00:00
Do not abort when there is no current dive
Yes, currentdive can be undefined in case of of a new logbook and starting the planner right away. Do not abort on that. Reported-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
This commit is contained in:
parent
abbb0a244d
commit
ff5c04eb97
1 changed files with 2 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue