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

#70 Visual Studio crashes when I quit debugging #526

Merged
merged 3 commits into from
Oct 14, 2015

Conversation

mousetraps
Copy link
Contributor

  • Fix potential NullReferenceExceptions

fix #70

- Fix potential NullReferenceExceptions
if (Tree != ProjectEntry.Tree) {
// we were enqueued and a new version became available, don't re-analyze against
// the old version.
if (Ast != null && ProjectEntry != null && ProjectEntry.Tree != null && Tree != ProjectEntry.Tree) {
Copy link
Member

Choose a reason for hiding this comment

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

Should these ever be null? Is it safe to fall through to the remaining code if they are?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I couldn't reproduce this issue, so I'm not entirely sure (there are null checks for these properties elsewhere in the code, so I presumed it would be safe enough here.) This is something I plan on asking dino today before merging in.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm going to at least Assert here, so that we can catch it in debug builds.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay... just reviewed this again with my alter ego from the future, and realized I was being an idiot. I intended to null check and not to flow through, and I totally misinterpreted your comment. fixed 😃

@billti
Copy link
Member

billti commented Oct 12, 2015

Minor comment, else 👍

mousetraps added a commit that referenced this pull request Oct 14, 2015
#70 Visual Studio crashes when I quit debugging
@mousetraps mousetraps merged commit f0d68f9 into microsoft:master Oct 14, 2015
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.

Visual Studio crashes when I quit debugging
3 participants