mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Fix null reference exception in ForEach-Object -Parallel input processing (#10577)
This commit is contained in:
committed by
Dongbo Wang
parent
22c6fb4a87
commit
ecad5f105d
@@ -509,7 +509,8 @@ namespace Microsoft.PowerShell.Commands
|
||||
private void ProcessParallelParameterSet()
|
||||
{
|
||||
// Validate piped InputObject
|
||||
if (_inputObject.BaseObject is ScriptBlock)
|
||||
if (_inputObject != null &&
|
||||
_inputObject.BaseObject is ScriptBlock)
|
||||
{
|
||||
WriteError(
|
||||
new ErrorRecord(
|
||||
|
||||
Reference in New Issue
Block a user