From 48f95f0cb4cae14377c5f944b38bf12643441b48 Mon Sep 17 00:00:00 2001 From: Paul Higinbotham Date: Mon, 18 Nov 2019 19:09:07 -0800 Subject: [PATCH] Fix null reference in SupportsVirtualTerminal property (#11105) --- .../engine/hostifaces/InternalHostUserInterface.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } } ///