Skip to content

Conversation

@daxian-dbw
Copy link
Member

@daxian-dbw daxian-dbw commented Oct 15, 2025

PR Summary

Fix #4960

The null reference is caused by the expression helpContent.type.name in the code. helpContent is a dynamic object that's guaranteed to not be null, and in a rare case, helpContent.type is null, so null reference exception gets thrown.

It's fixed by using helpContent.type?.name. @kborowinski kindly validated and confirmed the fix (THANK YOU!).

Microsoft Reviewers: Open in CodeFlow

Copy link
Collaborator

@SeeminglyScience SeeminglyScience left a comment

Choose a reason for hiding this comment

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

LGTM!

@daxian-dbw daxian-dbw merged commit b6c3e48 into PowerShell:master Oct 16, 2025
2 checks passed
@daxian-dbw daxian-dbw deleted the null_ref branch October 16, 2025 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Any attempt to Show help for the parameter at the cursor (Alt-H) causes exception on Windows PowerShell 5.1

2 participants