summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dive.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/dive.c b/dive.c
index fb9c4cec7..321c9d166 100644
--- a/dive.c
+++ b/dive.c
@@ -2905,6 +2905,11 @@ static int split_dive_at(struct dive *dive, int a, int b)
fixup_dive(d1);
fixup_dive(d2);
+ if (dive->divetrip) {
+ d1->divetrip = d2->divetrip = 0;
+ add_dive_to_trip(d1, dive->divetrip);
+ add_dive_to_trip(d2, dive->divetrip);
+ }
if ((i = get_divenr(dive)) < 0)
return 0;