aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/maintab.cpp
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2015-09-23 16:34:52 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-09-23 14:15:49 -0700
commitfec33cee93197bc33565b491e21ff191f1421f0a (patch)
tree11ae502f2327f7d63885433d65bfe37dc6433b42 /qt-ui/maintab.cpp
parenta9642d57518a7132648ea70be35bfd0af282fadc (diff)
downloadsubsurface-fec33cee93197bc33565b491e21ff191f1421f0a.tar.gz
Don't crash on new dive site
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/maintab.cpp')
-rw-r--r--qt-ui/maintab.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp
index 7bbcf3fc2..884f76c07 100644
--- a/qt-ui/maintab.cpp
+++ b/qt-ui/maintab.cpp
@@ -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) {