diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2016-09-20 09:10:02 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-09-20 09:26:35 -0700 |
commit | c809a8873cd7e0a9df80d18a6273b227ae2177b4 (patch) | |
tree | eb70aace582b8f79f5ac10f11114601f0c328961 /core/libdivecomputer.c | |
parent | 92caf2771b07ed721afa41afea08af1f7ae3f3a1 (diff) | |
download | subsurface-c809a8873cd7e0a9df80d18a6273b227ae2177b4.tar.gz |
Second attempt to fix crash
Linus pointed out that it might be another call site (and looking at his
proposed patch I noticed a logic error in my earlier attempt)
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core/libdivecomputer.c')
-rw-r--r-- | core/libdivecomputer.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |