This commit is contained in:
Luke Pulverenti 2014-03-26 15:21:34 -04:00
commit 6a5b64bcb4

View File

@ -127,6 +127,12 @@ namespace MediaBrowser.Dlna
private bool IsMatch(DeviceIdentification deviceInfo, DeviceIdentification profileInfo) private bool IsMatch(DeviceIdentification deviceInfo, DeviceIdentification profileInfo)
{ {
if (profileInfo == null)
{
//There are profiles without identification, ignore thoose
return false;
}
if (!string.IsNullOrWhiteSpace(profileInfo.DeviceDescription)) if (!string.IsNullOrWhiteSpace(profileInfo.DeviceDescription))
{ {
if (deviceInfo.DeviceDescription == null || !Regex.IsMatch(deviceInfo.DeviceDescription, profileInfo.DeviceDescription)) if (deviceInfo.DeviceDescription == null || !Regex.IsMatch(deviceInfo.DeviceDescription, profileInfo.DeviceDescription))