From d74040786c71d3a0e37ce8fadea52612f2826e8a Mon Sep 17 00:00:00 2001 From: "Chris Ross (ASP.NET)" Date: Wed, 3 May 2017 09:40:07 -0700 Subject: [PATCH] #1053 Prevent IISExpressDeployer.Dispose nullref if the process failed to start --- .../Deployers/IISExpressDeployer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.AspNetCore.Server.IntegrationTesting/Deployers/IISExpressDeployer.cs b/src/Microsoft.AspNetCore.Server.IntegrationTesting/Deployers/IISExpressDeployer.cs index 6f0ad80e42..bf056a382c 100644 --- a/src/Microsoft.AspNetCore.Server.IntegrationTesting/Deployers/IISExpressDeployer.cs +++ b/src/Microsoft.AspNetCore.Server.IntegrationTesting/Deployers/IISExpressDeployer.cs @@ -301,7 +301,7 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting // If by this point, the host process is still running (somehow), throw an error. // A test failure is better than a silent hang and unknown failure later on - if (!_hostProcess.HasExited) + if (_hostProcess != null && !_hostProcess.HasExited) { throw new Exception($"iisexpress Process {_hostProcess.Id} failed to shutdown"); }