소스 검색

fix children null reference

Luke Pulverenti 11 년 전
부모
커밋
02b34c6393
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      MediaBrowser.Controller/Entities/Folder.cs

+ 2 - 1
MediaBrowser.Controller/Entities/Folder.cs

@@ -1004,7 +1004,8 @@ namespace MediaBrowser.Controller.Entities
                 throw new ArgumentNullException();
             }
 
-            var list = new List<BaseItem>(_children.Count);
+            var initialCount = _children == null ? 100 : _children.Count;
+            var list = new List<BaseItem>(initialCount);
 
             AddRecursiveChildrenInternal(user, includeLinkedChildren, list);