diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-10-01 21:24:04 -0400 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-10-01 21:24:04 -0400 |
commit | a51903fbb66a32b996e37e38b5634d74358a3330 (patch) | |
tree | d6f8a5f5e2d92f3acaa997ef6b07258ba2a9358e | |
parent | 15a55b9648564eded8e40347185b8186e11220d8 (diff) | |
download | subsurface-a51903fbb66a32b996e37e38b5634d74358a3330.tar.gz |
Avoid NULL dereference
Coverity CID 1325297
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r-- | qt-ui/locationinformation.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/qt-ui/locationinformation.cpp b/qt-ui/locationinformation.cpp index 11dc53220..2cc554f81 100644 --- a/qt-ui/locationinformation.cpp +++ b/qt-ui/locationinformation.cpp @@ -565,7 +565,8 @@ void DiveLocationLineEdit::setCurrentDiveSiteUuid(uint32_t uuid) struct dive_site *ds = get_dive_site_by_uuid(uuid); if (!ds) clear(); - setText(ds->name); + else + setText(ds->name); } void DiveLocationLineEdit::showPopup() |