diff options
author | Jan Mulder <jlmulder@xs4all.nl> | 2018-10-31 11:17:26 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-10-31 14:51:31 +0000 |
commit | 68d7e7c4e386f8dfe2068cf8075aeef8f3dff367 (patch) | |
tree | a22f2337e389407c7449e99bbdf30aaca17b1261 /desktop-widgets/tab-widgets | |
parent | dec9401f48f922c1d8fc6ae40f4f5e50cf781ced (diff) | |
download | subsurface-68d7e7c4e386f8dfe2068cf8075aeef8f3dff367.tar.gz |
Desktop: do not crash in verbose mode on empty dive site
Import dives from a DC, and have ssrf started in verbose mode. After
downloading dives, hit ok, to add them to the dive list. This crashes
as we cannot get the uuid from the null dive site.
Added a simple guard to fix this.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Diffstat (limited to 'desktop-widgets/tab-widgets')
-rw-r--r-- | desktop-widgets/tab-widgets/maintab.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/desktop-widgets/tab-widgets/maintab.cpp b/desktop-widgets/tab-widgets/maintab.cpp index 1c0914e7f..102570174 100644 --- a/desktop-widgets/tab-widgets/maintab.cpp +++ b/desktop-widgets/tab-widgets/maintab.cpp @@ -604,7 +604,7 @@ void MainTab::updateDiveInfo(bool clear) else ui.cylinders->view()->hideColumn(CylindersModel::USE); - if (verbose) + if (verbose && displayed_dive.dive_site) qDebug() << "Set the current dive site:" << displayed_dive.dive_site->uuid; emit diveSiteChanged(); } |