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

NullReferenceException when $profile doesn’t exist #1502

Closed
dkattan opened this issue Jun 17, 2021 · 3 comments · Fixed by #1504
Closed

NullReferenceException when $profile doesn’t exist #1502

dkattan opened this issue Jun 17, 2021 · 3 comments · Fixed by #1504
Labels

Comments

@dkattan
Copy link
Contributor

dkattan commented Jun 17, 2021

Can we get a null check here to prevent profile loading if the $profile value is null?

@ghost ghost added the Needs: Triage Maintainer attention needed! label Jun 17, 2021
@SeeminglyScience
Copy link
Collaborator

Explicit casts do not throw on null in C#. Are you sure that's where the exception you're seeing is coming from?

@ghost ghost added the Needs: Maintainer Attention Maintainer attention needed! label Jun 17, 2021
@rjmholt
Copy link
Contributor

rjmholt commented Jun 17, 2021

Can we get a null check here

AFAIK you're the only person to report this, and we'd be happy to accept a PR

@andyleejordan andyleejordan removed the Needs: Maintainer Attention Maintainer attention needed! label Jun 17, 2021
@dkattan
Copy link
Contributor Author

dkattan commented Jun 18, 2021

Explicit casts do not throw on null in C#. Are you sure that's where the exception you're seeing is coming from?

You are correct, it is actually on line 382.

image

Can we get a null check here

AFAIK you're the only person to report this, and we'd be happy to accept a PR

I'm working on a merge request now.

@ghost ghost added the Needs: Maintainer Attention Maintainer attention needed! label Jun 18, 2021
@andyleejordan andyleejordan added Status: Fixed and removed Needs: Maintainer Attention Maintainer attention needed! Needs: Triage Maintainer attention needed! labels Jul 13, 2021
@andyleejordan andyleejordan linked a pull request Jul 13, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants