diff --git a/src/System.Management.Automation/engine/hostifaces/InternalHostUserInterface.cs b/src/System.Management.Automation/engine/hostifaces/InternalHostUserInterface.cs index acfd0b5a1e..366a76902c 100644 --- a/src/System.Management.Automation/engine/hostifaces/InternalHostUserInterface.cs +++ b/src/System.Management.Automation/engine/hostifaces/InternalHostUserInterface.cs @@ -80,7 +80,7 @@ namespace System.Management.Automation.Internal.Host public override bool SupportsVirtualTerminal { - get { return _externalUI.SupportsVirtualTerminal; } + get { return (_externalUI != null) ? _externalUI.SupportsVirtualTerminal : false; } } ///