fix: add null check

This commit is contained in:
Mikal Stordal 2024-03-24 04:41:15 +00:00
parent 0cf8b376ac
commit 7b17b5b488

View File

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