summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/locationinformation.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/qt-ui/locationinformation.cpp b/qt-ui/locationinformation.cpp
index 812666737..18f780983 100644
--- a/qt-ui/locationinformation.cpp
+++ b/qt-ui/locationinformation.cpp
@@ -73,7 +73,10 @@ LocationInformationWidget::LocationInformationWidget(QWidget *parent) : QGroupBo
void LocationInformationWidget::setCurrentDiveSite(int dive_nr)
{
currentDs = get_dive_site(dive_nr);
- setLocationId(currentDs->uuid);
+ if (currentDs)
+ setLocationId(currentDs->uuid);
+ else
+ setLocationId(displayed_dive.dive_site_uuid);
}
void LocationInformationWidget::setLocationId(uint32_t uuid)