Changeset ff5c04e in subsurface


Ignore:
Timestamp:
Apr 20, 2017, 10:57:11 AM (5 months ago)
Author:
Dirk Hohndel <dirk@…>
Branches:
master
Children:
dfe50922
Parents:
abbb0a2
git-author:
Jan Mulder <jlmulder@…> (04/20/17 01:49:50)
git-committer:
Dirk Hohndel <dirk@…> (04/20/17 10:57:11)
Message:

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@…>
Signed-off-by: Jan Mulder <jlmulder@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • desktop-widgets/mainwindow.cpp

    r89b914e rff5c04e  
    954954        DivePlannerPointsModel::instance()->createSimpleDive();
    955955        // plan the dive in the same mode as the currently selected one
    956         divePlannerSettingsWidget()->setDiveMode(current_dive->dc.divemode);
     956        if (current_dive)
     957                divePlannerSettingsWidget()->setDiveMode(current_dive->dc.divemode);
    957958        DivePictureModel::instance()->updateDivePictures();
    958959        divePlannerWidget()->setReplanButton(false);
Note: See TracChangeset for help on using the changeset viewer.