diff options
Diffstat (limited to 'core/parse.c')
-rw-r--r-- | core/parse.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/core/parse.c b/core/parse.c index 6205c5afa..8344d3552 100644 --- a/core/parse.c +++ b/core/parse.c @@ -246,12 +246,13 @@ void dive_end(struct parser_state *state) { if (!state->cur_dive) return; - if (!is_dive(state)) + if (!is_dive(state)) { free_dive(state->cur_dive); - else + } else { record_dive_to_table(state->cur_dive, state->target_table); - if (state->cur_trip) - add_dive_to_trip(state->cur_dive, state->cur_trip); + if (state->cur_trip) + add_dive_to_trip(state->cur_dive, state->cur_trip); + } state->cur_dive = NULL; state->cur_dc = NULL; state->cur_location.lat.udeg = 0; |