mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Dive import: remove dive-to-be added from trip before deletion
On dive import, dives to be added may be merged into already existing dives. In such a case, the dive to be added is deleted. Before doing so, it must be removed from the trip is belongs to to avoid corruption of the trip-list. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
207ca0f94e
commit
2775e7e991
1 changed files with 1 additions and 0 deletions
|
@ -1507,6 +1507,7 @@ static bool try_to_merge_into(struct dive *dive_to_add, int idx, bool prefer_imp
|
|||
add_dive_to_trip(merged, trip);
|
||||
}
|
||||
free_dive(old_dive);
|
||||
remove_dive_from_trip(dive_to_add, false);
|
||||
free_dive(dive_to_add);
|
||||
|
||||
return true;
|
||||
|
|
Loading…
Add table
Reference in a new issue