Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix NRE when trying to start the stopwatch #747

Merged
merged 3 commits into from
Sep 18, 2018

Conversation

rjmholt
Copy link
Contributor

@rjmholt rjmholt commented Sep 17, 2018

Discovered while debugging that the stopwatch in the execution timer wasn't being used properly.

Copy link
Member

@TylerLeonhardt TylerLeonhardt left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@rkeithhill rkeithhill left a comment

Choose a reason for hiding this comment

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

LGTM

@TylerLeonhardt
Copy link
Member

Looks like .NET doesn't like that it's called Stopwatch like the type name?

@rkeithhill
Copy link
Contributor

Yeah, the private Stopwatch property needs to be declared static.

@rjmholt
Copy link
Contributor Author

rjmholt commented Sep 18, 2018

Oops on non-static field.

@tylerl0706 for some reason .NET people like to call that the Color Color problem

@rjmholt rjmholt merged commit 8bf5c9c into PowerShell:master Sep 18, 2018
@rjmholt rjmholt deleted the null-ref-stopwatch-fix branch December 12, 2018 06:01
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.

3 participants