summaryrefslogtreecommitdiffstats
path: root/dive.h
diff options
context:
space:
mode:
Diffstat (limited to 'dive.h')
-rw-r--r--dive.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/dive.h b/dive.h
index 4978f4f9a..e2442818c 100644
--- a/dive.h
+++ b/dive.h
@@ -326,6 +326,9 @@ static inline void copy_gps_location(struct dive *from, struct dive *to)
if (from && to) {
to->latitude.udeg = from->latitude.udeg;
to->longitude.udeg = from->longitude.udeg;
+ if (!to->location) {
+ to->location = strdup(from->location);
+ }
}
}