diff --git a/dive.c b/dive.c index f527fae37..9e44345cf 100644 --- a/dive.c +++ b/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;