linuxdvb: ensure we don't crash if device ID goes missing

This commit is contained in:
Adam Sutton 2013-06-10 21:52:24 +01:00
parent e925c7d527
commit aca6be2ce9

View file

@ -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;