diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-02-19 23:59:18 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-02-19 19:49:30 -0800 |
commit | e761d00ddd68560e0f2b9d2f8650594978fa1168 (patch) | |
tree | ec13b26332d29b90bf096489b9c280c03ee28652 /CMakeLists.txt | |
parent | c6f73ae144566dff0d4a6ae5f803a72e4b64281b (diff) | |
download | subsurface-e761d00ddd68560e0f2b9d2f8650594978fa1168.tar.gz |
undo: don't add dive to null-trip
In moveDiveToTrip(), the dive was first removed from its old trip
and then added to the new trip. This function is also used to
remove the dive from its trip (by moving it to the "null-trip"
if you whish). Even in that case add_dive_to_trip() was called.
The only reason why this didn't crash is that add_dive_to_trip()
checks whether old and new trip are the same. This is the case
when adding to the "null-trip", since the dive was removed from
the trip just before.
To cut a long story short, to trust on add_dive_to_trip() not
crashing if moving from the null-trip to the null-trip is
way to subtly. If we remove a dive from its trip, don't call
add_dive_to_trip() in the first place.
Reported-by: Dirk Hohndel <dirk@hohndel.org>
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'CMakeLists.txt')
0 files changed, 0 insertions, 0 deletions