summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/divelist.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/divelist.c b/core/divelist.c
index 65c3298c8..922c04e43 100644
--- a/core/divelist.c
+++ b/core/divelist.c
@@ -1507,6 +1507,7 @@ static bool try_to_merge_into(struct dive *dive_to_add, int idx, bool prefer_imp
add_dive_to_trip(merged, trip);
}
free_dive(old_dive);
+ remove_dive_from_trip(dive_to_add, false);
free_dive(dive_to_add);
return true;