fix children null reference

This commit is contained in:
Luke Pulverenti 2013-09-25 22:22:54 -04:00
parent 4773bb65ce
commit b1a345341d

View File

@ -513,7 +513,7 @@ namespace MediaBrowser.Controller.Entities
/// <summary> /// <summary>
/// The children /// The children
/// </summary> /// </summary>
private IReadOnlyList<BaseItem> _children; private IReadOnlyList<BaseItem> _children = new List<BaseItem>();
/// <summary> /// <summary>
/// The _children sync lock /// The _children sync lock
/// </summary> /// </summary>
@ -1026,7 +1026,7 @@ namespace MediaBrowser.Controller.Entities
throw new ArgumentNullException(); throw new ArgumentNullException();
} }
var initialCount = _children == null ? 100 : _children.Count; var initialCount = _children.Count;
var list = new List<BaseItem>(initialCount); var list = new List<BaseItem>(initialCount);
AddRecursiveChildrenInternal(user, includeLinkedChildren, list); AddRecursiveChildrenInternal(user, includeLinkedChildren, list);