-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
[Settings > PT Run > PluginAdditionalOptions] Fix crash on empty number box #32832
Conversation
This comment has been minimized.
This comment has been minimized.
"severity high" + "wait for 0.82" ? |
Issue has "Severity highd". @jaimecbernardo marked other PRs last week with "wait for 0.82". So I thought the time frame for 0.81 is closed. @jaimecbernardo, is it closed? |
We can still get some simpler ones in. This one I think can go in. We're waiting for "Patch Tuesday" tomorrow to receive latest .NET and only after that build the release candidate, so this can still get in. Help me out understand something: this doesn't affect any current PowerToys Run plugin, right? I don't think we're using this NumberBox one ourselves, or are we? @htcfreek |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thank you for the contribution!
Thanks for the answers @htcfreek . That's what I thought as well.
Summary of the Pull Request
The settings app crashes when the user clears the number box and presses enter or moves the focus away from it. This happens because the value is not a valid number and converting this to
double
producesdouble.NaN
. Thedouble.NaN
then leads to the app crash.To fix this we now check the value of the number box against
NaN
and if the check is true we send aNotifyPropertyChanged()
command. This lets the NumberBox reload its binding value and resets the NumberBox to the last valid number input.We should consider this PR in a HotFix if we need one after releasing v0.81.0!
PR Checklist
Detailed Description of the Pull Request / Additional comments
Validation Steps Performed