Selaa lähdekoodia

fix: add null check

Mikal Stordal 1 vuosi sitten
vanhempi
sitoutus
7b17b5b488
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      MediaBrowser.Controller/Providers/DirectoryService.cs

+ 1 - 1
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);