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

Added null check in ManageMods.cs to prevent crash on an empty filter #3266

Merged
merged 1 commit into from
Jan 17, 2021

Conversation

alex-gillott
Copy link
Contributor

Fixed #3241 where application would err when using certain keyboard controls on an empty filter

@HebaruSan
Copy link
Member

This change looks great, thanks!

Home and End with an empty filter also crash GUI in the same function (they reference ModGrid.Rows[0] and ModGrid.Rows[ModGrid.Rows.Count - 1], which throws System.ArgumentOutOfRangeException). I think it would make sense to fix those here as well.

@HebaruSan HebaruSan added Bug Something is not working as intended GUI Issues affecting the interactive GUI Pull request labels Jan 16, 2021
@alex-gillott
Copy link
Contributor Author

This change looks great, thanks!

Home and End with an empty filter also crash GUI in the same function (they reference ModGrid.Rows[0] and ModGrid.Rows[ModGrid.Rows.Count - 1], which throws System.ArgumentOutOfRangeException). I think it would make sense to fix those here as well.

Just did those now. I hadn't seen them, but these conditions should fix

Copy link
Member

@HebaruSan HebaruSan left a comment

Choose a reason for hiding this comment

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

This looks great, thanks for contributing!

@HebaruSan HebaruSan merged commit e50b21d into KSP-CKAN:master Jan 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is not working as intended GUI Issues affecting the interactive GUI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] NullReferenceException on spacebar with empty filter
2 participants