diff options
| author | Bond_009 <bond.009@outlook.com> | 2019-02-06 17:41:38 +0100 |
|---|---|---|
| committer | Bond-009 <bond.009@outlook.com> | 2019-02-12 20:52:23 +0100 |
| commit | d409623086e210d9256ce0863f6fb8dad57e69ef (patch) | |
| tree | 6ea699caacb3f716937081f4682d4b51780a25b8 | |
| parent | 9af28607c990f5ddcd738c72d7183b9a57ba47c2 (diff) | |
Don't create multiple instances of the same type
| -rw-r--r-- | Emby.Server.Implementations/ApplicationHost.cs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index 5dcf42aae..41ac4fcff 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -512,7 +512,8 @@ namespace Emby.Server.Implementations var parts = GetExportTypes<T>() .Select(x => CreateInstanceSafe(x)) .Where(i => i != null) - .Cast<T>(); + .Cast<T>() + .ToList(); // Convert to list so this isn't executed for each iteration if (manageLifetime) { |
