mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
Fix SIGSEGV when joining dives without dive computer information
Handle the case where we have no divecomputer information. Reported-by: Sergey Starosek <sergey.starosek@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
d5da3c9a95
commit
5ac5408bb0
1 changed files with 1 additions and 1 deletions
2
dive.c
2
dive.c
|
@ -1292,7 +1292,7 @@ static void interleave_dive_computers(struct divecomputer *res,
|
|||
do {
|
||||
struct divecomputer *match;
|
||||
|
||||
res->model = strdup(a->model);
|
||||
res->model = a->model ? strdup(a->model) : NULL;
|
||||
res->deviceid = a->deviceid;
|
||||
res->diveid = a->diveid;
|
||||
res->next = NULL;
|
||||
|
|
Loading…
Reference in a new issue