Fix some warnings

This commit is contained in:
Bond_009
2021-05-28 14:33:54 +02:00
parent b12f509de3
commit 0bc0601442
27 changed files with 210 additions and 228 deletions

View File

@@ -455,7 +455,8 @@ namespace Emby.Server.Implementations.Plugins
try
{
_logger.LogDebug("Creating instance of {Type}", type);
var instance = (IPlugin)ActivatorUtilities.CreateInstance(_appHost.ServiceProvider, type);
// _appHost.ServiceProvider is already assigned when we create the plugins
var instance = (IPlugin)ActivatorUtilities.CreateInstance(_appHost.ServiceProvider!, type);
if (plugin == null)
{
// Create a dummy record for the providers.