mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-11 18:20:23 +01:00
Fix some warnings
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user