diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-06 10:30:36 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2012-12-06 11:00:52 -0800 |
commit | 5ac5408bb0775b7126242ec614b48b14cbdf3ab9 (patch) | |
tree | 9a3d4e985202079b744164afa6d2e012749a1a56 /dive.c | |
parent | d5da3c9a958de044ad934290d72ee9e1213fa427 (diff) | |
download | subsurface-5ac5408bb0775b7126242ec614b48b14cbdf3ab9.tar.gz |
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>
Diffstat (limited to 'dive.c')
-rw-r--r-- | dive.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |