diff options
author | Robert C. Helling <helling@atdotde.de> | 2019-05-28 22:54:58 +0200 |
---|---|---|
committer | bstoeger <32835590+bstoeger@users.noreply.github.com> | 2019-05-29 12:47:22 +0200 |
commit | b614a0433083927f1233c25f862e44479f692dc0 (patch) | |
tree | d3c461c3b720a21b4ab69870017ca6e8caca70f6 /desktop-widgets | |
parent | f6ab84f13fded4c9d91c2be086e5eb4b8abab390 (diff) | |
download | subsurface-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')
-rw-r--r-- | desktop-widgets/simplewidgets.cpp | 2 |
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"; |