diff options
| author | Claus Vium <cvium@users.noreply.github.com> | 2021-03-14 15:07:31 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-14 15:07:31 +0100 |
| commit | 109f24514fac52c8f138c4913d7ef614ff1973a1 (patch) | |
| tree | f03614233c1692d944641412d9b85df0a155ac47 | |
| parent | bd70f562189e81d409caf2f4f67d8d495d4bbf1e (diff) | |
| parent | 1d5b7b61fb002dd4b2e3fe4cf8dd02df590f64e7 (diff) | |
Merge pull request #5510 from BaronGreenback/DlnaFirstFix
Fix: Streaming crashing due to no deviceProfileId match.
| -rw-r--r-- | Emby.Dlna/DlnaManager.cs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Emby.Dlna/DlnaManager.cs b/Emby.Dlna/DlnaManager.cs index 552cd501b..c94d803e1 100644 --- a/Emby.Dlna/DlnaManager.cs +++ b/Emby.Dlna/DlnaManager.cs @@ -333,7 +333,12 @@ namespace Emby.Dlna throw new ArgumentNullException(nameof(id)); } - var info = GetProfileInfosInternal().First(i => string.Equals(i.Info.Id, id, StringComparison.OrdinalIgnoreCase)); + var info = GetProfileInfosInternal().FirstOrDefault(i => string.Equals(i.Info.Id, id, StringComparison.OrdinalIgnoreCase)); + + if (info == null) + { + return null; + } return ParseProfileFile(info.Path, info.Info.Type); } |
