fix children null reference

This commit is contained in:
Luke Pulverenti 2013-09-22 14:29:07 -04:00
parent 1c7c71075a
commit 02b34c6393

View File

@ -1004,7 +1004,8 @@ namespace MediaBrowser.Controller.Entities
throw new ArgumentNullException(); 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); AddRecursiveChildrenInternal(user, includeLinkedChildren, list);