Преглед изворни кода

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