#1053 Prevent IISExpressDeployer.Dispose nullref if the process failed to start

This commit is contained in:
Chris Ross (ASP.NET) 2017-05-03 09:40:07 -07:00
parent 3c358e9028
commit d74040786c
1 changed files with 1 additions and 1 deletions

View File

@ -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");
}