From 4e6e80f8d7853740b1810b2ed6ce91d4c3c58f2c Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Mon, 20 Apr 2020 15:18:02 -0400 Subject: [PATCH] Forgot to restore this else --- .../Security/WindowsSystemIdentity.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Tgstation.Server.Host/Security/WindowsSystemIdentity.cs b/src/Tgstation.Server.Host/Security/WindowsSystemIdentity.cs index 2197c48e10..aad76f2360 100644 --- a/src/Tgstation.Server.Host/Security/WindowsSystemIdentity.cs +++ b/src/Tgstation.Server.Host/Security/WindowsSystemIdentity.cs @@ -59,10 +59,12 @@ namespace Tgstation.Server.Host.Security { if (identity != null) identity.Dispose(); - - var context = userPrincipal.Context; - userPrincipal.Dispose(); - context.Dispose(); + else + { + var context = userPrincipal.Context; + userPrincipal.Dispose(); + context.Dispose(); + } } ///