aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Plugins/PluginManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Emby.Server.Implementations/Plugins/PluginManager.cs')
-rw-r--r--Emby.Server.Implementations/Plugins/PluginManager.cs4
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