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/device.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/device.c')
-rw-r--r-- | core/device.c | 2 |
1 files changed, 1 insertions, 1 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) |