Check for null during node process disposal. Fixes #1061

This commit is contained in:
Steve Sanderson
2017-07-03 10:09:03 +01:00
parent 76928bcbaa
commit 429a432dd3

View File

@@ -297,7 +297,7 @@ namespace Microsoft.AspNetCore.NodeServices.HostingModels
// Make sure the Node process is finished
// TODO: Is there a more graceful way to end it? Or does this still let it perform any cleanup?
if (!_nodeProcess.HasExited)
if (_nodeProcess != null && !_nodeProcess.HasExited)
{
_nodeProcess.Kill();
}