diff --git a/src/Wpf.Ui/Controls/PasswordBox/PasswordBox.cs b/src/Wpf.Ui/Controls/PasswordBox/PasswordBox.cs index d888b18f8..d49a0d341 100644 --- a/src/Wpf.Ui/Controls/PasswordBox/PasswordBox.cs +++ b/src/Wpf.Ui/Controls/PasswordBox/PasswordBox.cs @@ -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)