Skip to content

Commit

Permalink
fix: possible null reference exceptions in PasswordBox (#1091)
Browse files Browse the repository at this point in the history
  • Loading branch information
textGamex authored Jun 2, 2024
1 parent 232b9c6 commit 259faf2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Wpf.Ui/Controls/PasswordBox/PasswordBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ private void UpdateTextContents(bool isTriggeredByTextInput)

var caretIndex = CaretIndex;
var selectionIndex = SelectionStart;
var currentPassword = Password;
var currentPassword = Password ?? string.Empty;
var newPasswordValue = currentPassword;

if (isTriggeredByTextInput)
Expand Down

0 comments on commit 259faf2

Please sign in to comment.