summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/simplewidgets.cpp
diff options
context:
space:
mode:
authorGravatar Robert C. Helling <helling@atdotde.de>2019-05-28 22:54:58 +0200
committerGravatar bstoeger <32835590+bstoeger@users.noreply.github.com>2019-05-29 12:47:22 +0200
commitb614a0433083927f1233c25f862e44479f692dc0 (patch)
treed3c461c3b720a21b4ab69870017ca6e8caca70f6 /desktop-widgets/simplewidgets.cpp
parentf6ab84f13fded4c9d91c2be086e5eb4b8abab390 (diff)
downloadsubsurface-b614a0433083927f1233c25f862e44479f692dc0.tar.gz
Check if dive_site exists before accessing its name
... in copy dive to clipboad. Fixes #2109 Signed-off-by: Robert C. Helling <helling@atdotde.de>
Diffstat (limited to 'desktop-widgets/simplewidgets.cpp')
-rw-r--r--desktop-widgets/simplewidgets.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/desktop-widgets/simplewidgets.cpp b/desktop-widgets/simplewidgets.cpp
index f28f8c6a0..f5bd5640e 100644
--- a/desktop-widgets/simplewidgets.cpp
+++ b/desktop-widgets/simplewidgets.cpp
@@ -496,7 +496,7 @@ void DiveComponentSelection::buttonClicked(QAbstractButton *button)
QTextStream text;
QString cliptext;
text.setString(&cliptext);
- if (what->divesite)
+ if (what->divesite && displayed_dive.dive_site)
text << tr("Dive site: ") << displayed_dive.dive_site->name << "\n";
if (what->divemaster)
text << tr("Dive master: ") << displayed_dive.divemaster << "\n";