summaryrefslogtreecommitdiffstats
path: root/desktop-widgets
diff options
context:
space:
mode:
Diffstat (limited to 'desktop-widgets')
-rw-r--r--desktop-widgets/locationinformation.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/desktop-widgets/locationinformation.cpp b/desktop-widgets/locationinformation.cpp
index 016cbf947..4ca872192 100644
--- a/desktop-widgets/locationinformation.cpp
+++ b/desktop-widgets/locationinformation.cpp
@@ -143,12 +143,13 @@ void LocationInformationWidget::acceptChanges()
char *uiString;
struct dive_site *currentDs;
uiString = ui.diveSiteName->text().toUtf8().data();
-
- if (get_dive_site_by_uuid(displayed_dive_site.uuid) != NULL)
+ if (get_dive_site_by_uuid(displayed_dive_site.uuid) != NULL) {
currentDs = get_dive_site_by_uuid(displayed_dive_site.uuid);
- else
+ } else {
+ qWarning() << "did not have valid dive site in LocationInformationWidget";
currentDs = get_dive_site_by_uuid(create_dive_site_from_current_dive(uiString));
-
+ displayed_dive.dive_site_uuid = currentDs->uuid;
+ }
currentDs->latitude = displayed_dive_site.latitude;
currentDs->longitude = displayed_dive_site.longitude;
if (!same_string(uiString, currentDs->name)) {