mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-21 01:12:51 +02:00
Don't create multiple instances of the same type
This commit is contained in:
parent
9af28607c9
commit
d409623086
1 changed files with 2 additions and 1 deletions
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue