From d85a448ee8c87607f2fa3103a2d8dd7fb8b76443 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Wed, 23 Sep 2015 20:03:53 -0700 Subject: Dive edit: if the user didn't pick a dive site, don't mess with it Signed-off-by: Dirk Hohndel --- qt-ui/maintab.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'qt-ui/maintab.cpp') 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; -- cgit v1.2.3-70-g09d2