mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-20 06:45:27 +00:00
Check if trip is NULL before calling DIVE_TRIP
Other places have this check, but for this particular one a crash
can be reproduced:
./subsurface ./dives/*
log -> autogroup
log -> autogroup
Against d14932058f
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
d14932058f
commit
bf83aa2104
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue