瀏覽代碼

Merge pull request #755 from 7illusions/master

Identification bugfix
Luke 11 年之前
父節點
當前提交
4a8fbad50f
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      MediaBrowser.Dlna/DlnaManager.cs

+ 6 - 0
MediaBrowser.Dlna/DlnaManager.cs

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