From e1fa1d3faf03d551f0e109cf8e25b39a86f1d936 Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Sat, 8 Sep 2018 15:07:14 -0400 Subject: [PATCH] Fix more null reattach info errors --- src/Tgstation.Server.Host/Components/Watchdog/Watchdog.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Tgstation.Server.Host/Components/Watchdog/Watchdog.cs b/src/Tgstation.Server.Host/Components/Watchdog/Watchdog.cs index 4d36e949d0..6ce7108c42 100644 --- a/src/Tgstation.Server.Host/Components/Watchdog/Watchdog.cs +++ b/src/Tgstation.Server.Host/Components/Watchdog/Watchdog.cs @@ -650,7 +650,7 @@ namespace Tgstation.Server.Host.Components.Watchdog throw new InvalidOperationException("Entered LaunchNoLock with one or more of the servers not being null!"); var reattachInfo = doReattach ? await reattachInfoHandler.Load(cancellationToken).ConfigureAwait(false) : null; - var doesntNeedNewDmb = doReattach && reattachInfo.Alpha != null && reattachInfo.Bravo != null; + var doesntNeedNewDmb = doReattach && reattachInfo?.Alpha != null && reattachInfo?.Bravo != null; var dmbToUse = doesntNeedNewDmb ? null : dmbFactory.LockNextDmb(2); try @@ -705,7 +705,7 @@ namespace Tgstation.Server.Host.Components.Watchdog cancellationToken.ThrowIfCancellationRequested(); //both servers are now running, alpha is the active server, huzzah - AlphaIsActive = doReattach ? reattachInfo.AlphaIsActive : true; + AlphaIsActive = doReattach ? reattachInfo?.AlphaIsActive ?? true : true; LastLaunchResult = alphaLrt.Result; logger.LogInformation("Launched servers successfully"); Running = true;