Don't crash on new dive site

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2015-09-23 16:34:52 -03:00 committed by Dirk Hohndel
parent a9642d5751
commit fec33cee93

View file

@ -813,6 +813,10 @@ void MainTab::updateDisplayedDiveSite()
const uint32_t new_uuid = ui.location->currDiveSiteUuid();
qDebug() << "Updating Displayed Dive Site";
if (new_uuid == RECENTLY_ADDED_DIVESITE) {
qDebug() << "New dive site selected, don't try to update something that doesn't exists yet.";
return;
}
if(orig_uuid) {
if (new_uuid && orig_uuid != new_uuid) {