aboutsummaryrefslogtreecommitdiffstats
path: root/uemis-downloader.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2012-12-29 11:28:35 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2012-12-29 11:28:35 -0800
commit7aaa539afe56fb7de99408ba95b55e423cf6856a (patch)
tree7ddce07e54d4b8663df21c0b18738d1d8041fb9b /uemis-downloader.c
parente862f7c3439f521f20b709936d5672b9b63895b4 (diff)
downloadsubsurface-7aaa539afe56fb7de99408ba95b55e423cf6856a.tar.gz
Make sure the model is non-NULL before comparing with it
In commit 194a05b18911 "Correct the detection of existing dives in the Uemis downloader" I forgot to add that check before calling strcmp. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'uemis-downloader.c')
-rw-r--r--uemis-downloader.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/uemis-downloader.c b/uemis-downloader.c
index 465437aa6..1c7b23887 100644
--- a/uemis-downloader.c
+++ b/uemis-downloader.c
@@ -733,7 +733,7 @@ static char *get_divenr(char *deviceidstr)
for (i = 0; i < dive_table.nr; i++) {
struct divecomputer *dc = &dive_table.dives[i]->dc;
while (dc) {
- if (!strcmp(dc->model, "Uemis Zurich") &&
+ if (dc->model && !strcmp(dc->model, "Uemis Zurich") &&
dc->deviceid == deviceid && dc->diveid > maxdiveid)
maxdiveid = dc->diveid;
dc = dc->next;