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

@@ -43,7 +43,12 @@ namespace Jellyfin.Server.Implementations.Events
private async Task PublishInternal<T>(T eventArgs)
where T : EventArgs
{
using var scope = _appHost.ServiceProvider.CreateScope();
using var scope = _appHost.ServiceProvider?.CreateScope();
if (scope == null)
{
return;
}
foreach (var service in scope.ServiceProvider.GetServices<IEventConsumer<T>>())
{
try