From d409623086e210d9256ce0863f6fb8dad57e69ef Mon Sep 17 00:00:00 2001 From: Bond_009 Date: Wed, 6 Feb 2019 17:41:38 +0100 Subject: [PATCH] Don't create multiple instances of the same type --- Emby.Server.Implementations/ApplicationHost.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index 5dcf42aae9..41ac4fcffa 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -512,7 +512,8 @@ namespace Emby.Server.Implementations var parts = GetExportTypes() .Select(x => CreateInstanceSafe(x)) .Where(i => i != null) - .Cast(); + .Cast() + .ToList(); // Convert to list so this isn't executed for each iteration if (manageLifetime) {