diff options
| author | theguymadmax <171496228+theguymadmax@users.noreply.github.com> | 2025-11-17 14:09:02 -0500 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2025-11-17 14:09:02 -0500 |
| commit | e51680cf56f423c0401dad87e030be48337af5cb (patch) | |
| tree | c579bdc1d5125c9ef889d2df4a66b00ed29b0596 | |
| parent | 2e7d7752e931631a9acaf02f839a4106ffd94e35 (diff) | |
Backport pull request #15462 from jellyfin/release-10.11.z
Fix NullReferenceException in GetPathProtocol when path is null
Original-merge: 7c1063177f5647e07c634d36694f0bdec8fe4ff1
Merged-by: joshuaboniface <joshua@boniface.me>
Backported-by: Bond_009 <bond.009@outlook.com>
| -rw-r--r-- | Emby.Server.Implementations/Library/MediaSourceManager.cs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Emby.Server.Implementations/Library/MediaSourceManager.cs b/Emby.Server.Implementations/Library/MediaSourceManager.cs index 750346169..c667fb060 100644 --- a/Emby.Server.Implementations/Library/MediaSourceManager.cs +++ b/Emby.Server.Implementations/Library/MediaSourceManager.cs @@ -226,6 +226,11 @@ namespace Emby.Server.Implementations.Library /// <inheritdoc />> public MediaProtocol GetPathProtocol(string path) { + if (string.IsNullOrEmpty(path)) + { + return MediaProtocol.File; + } + if (path.StartsWith("Rtsp", StringComparison.OrdinalIgnoreCase)) { return MediaProtocol.Rtsp; |
