linuxdvb: ensure we don't crash if device ID goes missing
This commit is contained in:
parent
e925c7d527
commit
aca6be2ce9
1 changed files with 2 additions and 1 deletions
|
@ -276,7 +276,8 @@ linuxdvb_device_find_by_hwid ( const char *hwid )
|
|||
{
|
||||
linuxdvb_hardware_t *lh;
|
||||
LIST_FOREACH(lh, &linuxdvb_device_all, lh_parent_link) {
|
||||
if (!strcmp(hwid, ((linuxdvb_device_t*)lh)->ld_devid.di_id))
|
||||
|
||||
if (!strcmp(hwid, ((linuxdvb_device_t*)lh)->ld_devid.di_id ?: ""))
|
||||
return (linuxdvb_device_t*)lh;
|
||||
}
|
||||
return NULL;
|
||||
|
|
Loading…
Add table
Reference in a new issue