mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-30 16:39:21 +01:00
Guard against potential null reference exception
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Options;
|
||||
using System;
|
||||
using Tgstation.Server.Api.Models.Internal;
|
||||
using Tgstation.Server.Host.Components.Chat;
|
||||
using Tgstation.Server.Host.Components.Deployment;
|
||||
@@ -73,6 +74,6 @@ namespace Tgstation.Server.Host.Components.Watchdog
|
||||
LoggerFactory.CreateLogger<PosixWatchdog>(),
|
||||
settings,
|
||||
instance,
|
||||
settings.AutoStart.Value);
|
||||
settings.AutoStart ?? throw new ArgumentNullException(nameof(settings)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -97,6 +97,6 @@ namespace Tgstation.Server.Host.Components.Watchdog
|
||||
LoggerFactory.CreateLogger<BasicWatchdog>(),
|
||||
settings,
|
||||
instance,
|
||||
settings.AutoStart.Value);
|
||||
settings.AutoStart ?? throw new ArgumentNullException(nameof(settings)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,6 +80,6 @@ namespace Tgstation.Server.Host.Components.Watchdog
|
||||
LoggerFactory.CreateLogger<WindowsWatchdog>(),
|
||||
settings,
|
||||
instance,
|
||||
settings.AutoStart.Value);
|
||||
settings.AutoStart ?? throw new ArgumentNullException(nameof(settings)));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user