summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/divelogexportdialog.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2019-10-27 07:28:57 -0400
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-10-27 07:35:46 -0700
commit33137c62b05006bb2bf3925b1e504a95f356830e (patch)
tree27267df8553a21a74eb9ed0655189f872037d83a /desktop-widgets/divelogexportdialog.cpp
parent08fcda60ac9a5705fa84b79cabe189a9e850e31d (diff)
downloadsubsurface-33137c62b05006bb2bf3925b1e504a95f356830e.tar.gz
Cleanup: NULL check pointer before dereferencing
Found by Coverity. CID 350081, 350087, 350095 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'desktop-widgets/divelogexportdialog.cpp')
-rw-r--r--desktop-widgets/divelogexportdialog.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/desktop-widgets/divelogexportdialog.cpp b/desktop-widgets/divelogexportdialog.cpp
index e44f2280d..8f192c39e 100644
--- a/desktop-widgets/divelogexportdialog.cpp
+++ b/desktop-widgets/divelogexportdialog.cpp
@@ -377,7 +377,7 @@ void DiveLogExportDialog::export_TeX(const char *filename, const bool selected_o
dive_site *site = dive->dive_site;
QRegExp ct("countrytag: (\\w+)");
QString country;
- if (ct.indexIn(site->notes) >= 0)
+ if (site && ct.indexIn(site->notes) >= 0)
country = ct.cap(1);
else
country = "";