mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Fix crash when merging dives with a missing dive computer model
The test for the dive being a planned dive was completely bogus:
- it should use "same_string()" which correctly checks for NULL
- the string it checks for is obviously spelled wrong anyway.
Reported-by: Alessandro Volpi <volpial@gmail.com>
Fixes: a031dbbbd
("When merging planned dives keep all cylinders")
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
78059d4010
commit
83aff9f777
1 changed files with 1 additions and 1 deletions
|
@ -3139,7 +3139,7 @@ struct dive *merge_dives(struct dive *a, struct dive *b, int offset, bool prefer
|
|||
dl = b;
|
||||
}
|
||||
|
||||
if (!strcmp(a->dc.model, "planneed dive")) {
|
||||
if (same_string(a->dc.model, "planned dive")) {
|
||||
struct dive *tmp = a;
|
||||
a = b;
|
||||
b = tmp;
|
||||
|
|
Loading…
Add table
Reference in a new issue