aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/device.c2
-rw-r--r--core/libdivecomputer.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/core/device.c b/core/device.c
index dde758dc8..86c30dbd9 100644
--- a/core/device.c
+++ b/core/device.c
@@ -193,7 +193,7 @@ static void match_id(void *_dc, const char *model, uint32_t deviceid,
if (dc->deviceid != deviceid)
return;
- if (strcmp(dc->model, model))
+ if (!model || !dc->model || strcmp(dc->model, model))
return;
if (serial && !dc->serial)
diff --git a/core/libdivecomputer.c b/core/libdivecomputer.c
index 7eea60393..25abc4d23 100644
--- a/core/libdivecomputer.c
+++ b/core/libdivecomputer.c
@@ -498,7 +498,7 @@ static void dc_match_serial(void *_dc, const char *model, uint32_t deviceid, con
if (!deviceid)
return;
- if (!dc->model && (!model || strcasecmp(dc->model, model)))
+ if (!dc->model || !model || strcasecmp(dc->model, model))
return;
if (!dc->serial || !serial || strcasecmp(dc->serial, serial))
return;