Dive edit: if the user didn't pick a dive site, don't mess with it

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2015-09-23 20:03:53 -07:00
parent 6ee2a44235
commit d85a448ee8

View file

@ -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;