From 02b34c6393b7cbff9085042f5b1f8e08c38c398e Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 22 Sep 2013 14:29:07 -0400 Subject: [PATCH] fix children null reference --- MediaBrowser.Controller/Entities/Folder.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MediaBrowser.Controller/Entities/Folder.cs b/MediaBrowser.Controller/Entities/Folder.cs index e68d4be8e..0d91a2e86 100644 --- a/MediaBrowser.Controller/Entities/Folder.cs +++ b/MediaBrowser.Controller/Entities/Folder.cs @@ -1004,7 +1004,8 @@ namespace MediaBrowser.Controller.Entities throw new ArgumentNullException(); } - var list = new List(_children.Count); + var initialCount = _children == null ? 100 : _children.Count; + var list = new List(initialCount); AddRecursiveChildrenInternal(user, includeLinkedChildren, list);