From b614a0433083927f1233c25f862e44479f692dc0 Mon Sep 17 00:00:00 2001 From: "Robert C. Helling" Date: Tue, 28 May 2019 22:54:58 +0200 Subject: Check if dive_site exists before accessing its name ... in copy dive to clipboad. Fixes #2109 Signed-off-by: Robert C. Helling --- desktop-widgets/simplewidgets.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"; -- cgit v1.2.3-70-g09d2