summaryrefslogtreecommitdiffstats
path: root/desktop-widgets
diff options
context:
space:
mode:
authorGravatar Jan Mulder <jlmulder@xs4all.nl>2017-12-28 20:44:41 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-12-29 09:14:20 -0800
commitca7b0017a7b455652dc0b69d0f1203530bc03f62 (patch)
tree8e3f3f0b9a793d844a1c0e59df92d51ce0525ef1 /desktop-widgets
parent8634dcc3934c80154f62f541f431daa50315df2f (diff)
downloadsubsurface-ca7b0017a7b455652dc0b69d0f1203530bc03f62.tar.gz
cleanup: Unchecked return value
CID 208312 Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Diffstat (limited to 'desktop-widgets')
-rw-r--r--desktop-widgets/locationinformation.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/desktop-widgets/locationinformation.cpp b/desktop-widgets/locationinformation.cpp
index f10b2b766..b8cbd689d 100644
--- a/desktop-widgets/locationinformation.cpp
+++ b/desktop-widgets/locationinformation.cpp
@@ -203,9 +203,10 @@ void LocationInformationWidget::acceptChanges()
if (!ui.diveSiteCoordinates->text().isEmpty()) {
double lat, lon;
- parseGpsText(ui.diveSiteCoordinates->text(), &lat, &lon);
- currentDs->latitude.udeg = lrint(lat * 1000000.0);
- currentDs->longitude.udeg = lrint(lon * 1000000.0);
+ if (parseGpsText(ui.diveSiteCoordinates->text(), &lat, &lon)) {
+ currentDs->latitude.udeg = lrint(lat * 1000000.0);
+ currentDs->longitude.udeg = lrint(lon * 1000000.0);
+ }
}
if (dive_site_is_empty(currentDs)) {
LocationInformationModel::instance()->removeRow(get_divesite_idx(currentDs));