Merge pull request 279 from dev/exit-pshostprocess into develop

Fix Exit-PSHostProcess cmdlet crash issue
This commit is contained in:
Andy Schwartzmeyer
2015-11-13 16:27:38 +00:00
+1 -1
View File
@@ -417,7 +417,7 @@ namespace Microsoft.Samples.PowerShell.Host
// Read commands and run them until the ShouldExit flag is set by
// the user calling "exit".
while (!this.ShouldExit)
while (!this.ShouldExit && this.myHost.Runspace != null)
{
string prompt = Prompt(this.myHost.Runspace);