summaryrefslogtreecommitdiffstats
path: root/qt-ui/maintab.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-09-23 20:03:53 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-09-23 20:03:53 -0700
commitd85a448ee8c87607f2fa3103a2d8dd7fb8b76443 (patch)
tree7cc83719715d2e0a5a92dbf7720cf2a83bd08028 /qt-ui/maintab.cpp
parent6ee2a44235cd3cf391aec6d6a60098e19fd01e81 (diff)
downloadsubsurface-d85a448ee8c87607f2fa3103a2d8dd7fb8b76443.tar.gz
Dive edit: if the user didn't pick a dive site, don't mess with it
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/maintab.cpp')
-rw-r--r--qt-ui/maintab.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp
index f9aeabd0d..b84b27c67 100644
--- a/qt-ui/maintab.cpp
+++ b/qt-ui/maintab.cpp
@@ -868,6 +868,9 @@ void MainTab::updateDiveSite(int divenr)
}
uint32_t pickedUuid = ui.location->currDiveSiteUuid();
+ if (pickedUuid == 0)
+ return;
+
const uint32_t origUuid = cd->dive_site_uuid;
struct dive_site *origDs = get_dive_site_by_uuid(origUuid);
struct dive_site *newDs = NULL;