Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,8 @@ private void InitParallelParameterSet()
private void ProcessParallelParameterSet()
{
// Validate piped InputObject
if (_inputObject.BaseObject is ScriptBlock)
if (_inputObject != null &&
_inputObject.BaseObject is ScriptBlock)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error message for null does not look correct.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A null input object is valid, so there is no error for that. This check just prevents a null dereference when checking the input type.

{
WriteError(
new ErrorRecord(
Expand Down