]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
linuxdvb: ensure we don't crash if device ID goes missing
authorAdam Sutton <dev@adamsutton.me.uk>
Mon, 10 Jun 2013 20:52:24 +0000 (21:52 +0100)
committerAdam Sutton <dev@adamsutton.me.uk>
Mon, 10 Jun 2013 20:52:24 +0000 (21:52 +0100)
src/input/mpegts/linuxdvb/linuxdvb_device.c

index 0fa22ec19567f0828a9ae0309782d7c6b570abee..08eb73c20deea109291f6b7220552af2f9e2a3ff 100644 (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;