aboutsummaryrefslogtreecommitdiffstats
path: root/core/trip.c
diff options
context:
space:
mode:
Diffstat (limited to 'core/trip.c')
-rw-r--r--core/trip.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/trip.c b/core/trip.c
index bc9b1b5a9..c4534fe27 100644
--- a/core/trip.c
+++ b/core/trip.c
@@ -122,7 +122,9 @@ void remove_dive_from_trip(struct dive *dive, struct trip_table *trip_table_arg)
dive_trip_t *alloc_trip(void)
{
- return calloc(1, sizeof(dive_trip_t));
+ dive_trip_t *res = calloc(1, sizeof(dive_trip_t));
+ res->id = dive_getUniqID();
+ return res;
}
/* insert the trip into the trip table */