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

[MWB]Fix crash when trying to read null settings #27682

Merged

Conversation

jaimecbernardo
Copy link
Collaborator

Summary of the Pull Request

After #27442 , there's a bug where both Mouse Without Borders and opening the Mouse Without Borders settings page will crash after the first reload due to trying to read null settings.

Detailed Description of the Pull Request / Additional comments

Add a null check around the Settings, since they might not be there from migration if the user never ran a version before .72.

Validation Steps Performed

1 - Clear %localappdata%\Microsoft\PowerToys
2 - Enable MWB, generate a key
3 - Restart PowerToys as admin
4 - Enable "Service Mode". Verify that MWB is started as a service successfully
5 - Go to another settings page, then try to enter MWB page again. Settings doesn't crash anymore.

Copy link
Contributor

@yuyoyuppe yuyoyuppe left a comment

Choose a reason for hiding this comment

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

LGTM

@jaimecbernardo jaimecbernardo merged commit a1f21fd into microsoft:main Jul 31, 2023
7 checks passed
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.

2 participants