summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dive.c2
1 files changed, 1 insertions, 1 deletions
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;