summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--divelist.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/divelist.c b/divelist.c
index a6f6332e1..d57188a68 100644
--- a/divelist.c
+++ b/divelist.c
@@ -713,7 +713,7 @@ void autogroup_dives(void)
if (lastdive && dive->when < lastdive->when + TRIP_THRESHOLD) {
dive_trip_t *trip = lastdive->divetrip;
add_dive_to_trip(dive, trip);
- if (dive->location && !trip->location)
+ if (get_dive_location(dive) && !trip->location)
trip->location = copy_string(get_dive_location(dive));
lastdive = dive;
continue;