From ca7b0017a7b455652dc0b69d0f1203530bc03f62 Mon Sep 17 00:00:00 2001 From: Jan Mulder Date: Thu, 28 Dec 2017 20:44:41 +0100 Subject: cleanup: Unchecked return value CID 208312 Signed-off-by: Jan Mulder --- desktop-widgets/locationinformation.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'desktop-widgets/locationinformation.cpp') 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)); -- cgit v1.2.3-70-g09d2