summaryrefslogtreecommitdiffstats
path: root/divelist.c
diff options
context:
space:
mode:
Diffstat (limited to 'divelist.c')
-rw-r--r--divelist.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/divelist.c b/divelist.c
index f032e6243..909e27bea 100644
--- a/divelist.c
+++ b/divelist.c
@@ -1067,7 +1067,8 @@ static void fill_dive_list(void)
}
} else if (DIVE_IN_TRIP(dive)) {
trip = find_matching_trip(dive->when);
- dive_trip = DIVE_TRIP(trip);
+ if (trip)
+ dive_trip = DIVE_TRIP(trip);
} else {
/* dive is not in a trip and we aren't autogrouping */
dive_trip = NULL;