소스 검색

add people null check

Luke Pulverenti 9 년 전
부모
커밋
c135bb17f2
1개의 변경된 파일6개의 추가작업 그리고 3개의 파일을 삭제
  1. 6 3
      MediaBrowser.Server.Implementations/Library/Validators/PeopleValidator.cs

+ 6 - 3
MediaBrowser.Server.Implementations/Library/Validators/PeopleValidator.cs

@@ -165,11 +165,14 @@ namespace MediaBrowser.Server.Implementations.Library.Validators
 
                 var item = _libraryManager.GetItemById(id);
 
-                await _libraryManager.DeleteItem(item, new DeleteOptions
+                if (item != null)
                 {
-                    DeleteFileLocation = false
+                    await _libraryManager.DeleteItem(item, new DeleteOptions
+                    {
+                        DeleteFileLocation = false
 
-                }).ConfigureAwait(false);
+                    }).ConfigureAwait(false);
+                }
             }
 
             progress.Report(100);