From 7b17b5b488989f37108b6f6d07be68050f0eb5f0 Mon Sep 17 00:00:00 2001 From: Mikal Stordal Date: Sun, 24 Mar 2024 04:41:15 +0000 Subject: [PATCH] fix: add null check --- MediaBrowser.Controller/Providers/DirectoryService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MediaBrowser.Controller/Providers/DirectoryService.cs b/MediaBrowser.Controller/Providers/DirectoryService.cs index 5ab1e27987..55f198ea21 100644 --- a/MediaBrowser.Controller/Providers/DirectoryService.cs +++ b/MediaBrowser.Controller/Providers/DirectoryService.cs @@ -77,7 +77,7 @@ namespace MediaBrowser.Controller.Providers if (!_fileCache.TryGetValue(path, out var result)) { var file = _fileSystem.GetFileSystemInfo(path); - if (file.Exists) + if (file?.Exists ?? false) { result = file; _fileCache.TryAdd(path, result);