diff options
| author | BaronGreenback <jimcartlidge@yahoo.co.uk> | 2020-12-23 10:26:02 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-23 10:26:02 +0000 |
| commit | 4ba4eefeeb145d03c1599c12a1ef61b4f87f67fb (patch) | |
| tree | caf312306e030c544dd0c53ab6cf2b73b7d4dd61 | |
| parent | 66d98cb8e406d1dddebd339b0aab20b93df4bf7b (diff) | |
Update Emby.Server.Implementations/Plugins/PluginManager.cs
Co-authored-by: Claus Vium <cvium@users.noreply.github.com>
| -rw-r--r-- | Emby.Server.Implementations/Plugins/PluginManager.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Emby.Server.Implementations/Plugins/PluginManager.cs b/Emby.Server.Implementations/Plugins/PluginManager.cs index fbb092a7c..2609f6fca 100644 --- a/Emby.Server.Implementations/Plugins/PluginManager.cs +++ b/Emby.Server.Implementations/Plugins/PluginManager.cs @@ -232,9 +232,9 @@ namespace Emby.Server.Implementations.Plugins var plugins = _plugins.Where(p => p.Id.Equals(id)); plugin = plugins.FirstOrDefault(p => p.Instance != null); - if (plugin == null) + if (plugin == null && plugins.Length > 0) { - plugin = plugins.OrderByDescending(p => p.Version).FirstOrDefault(); + plugin = plugins.OrderByDescending(p => p.Version)[0]; } } else |
