mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Format-Wide: Fix NullReferenceException (#15990)
This commit is contained in:
@@ -458,7 +458,7 @@ namespace Microsoft.PowerShell.Commands.Internal.Format
|
||||
}
|
||||
|
||||
sb.Append(GenerateRowField(values[k], _si.columnInfo[k].width, alignment[k], dc, addPadding));
|
||||
if (values[k].Contains(ESC))
|
||||
if (values[k] is not null && values[k].Contains(ESC))
|
||||
{
|
||||
// Reset the console output if the content of this column contains ESC
|
||||
sb.Append(PSStyle.Instance.Reset);
|
||||
|
||||
Reference in New Issue
Block a user