diff options
author | Miquel Lionel <lionel@les-miquelots.net> | 2024-01-25 22:08:16 +0100 |
---|---|---|
committer | Miquel Lionel <lionel@les-miquelots.net> | 2024-01-25 22:08:16 +0100 |
commit | a9d63642923adaf3511c65562d8c13b4a5b32a83 (patch) | |
tree | 43126478778cd16c8c7a8a2619fdf4a0c54e6ffc /main/src | |
parent | 75d29bd6d772bf693c2f24b1db8fe4b8f3597cf0 (diff) | |
download | dino-a9d63642923adaf3511c65562d8c13b4a5b32a83.tar.gz dino-a9d63642923adaf3511c65562d8c13b4a5b32a83.zip |
Add null checks in password_hybrid.changed.connect signalobsfucate-password-length
Diffstat (limited to 'main/src')
-rw-r--r-- | main/src/ui/manage_accounts/dialog.vala | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/main/src/ui/manage_accounts/dialog.vala b/main/src/ui/manage_accounts/dialog.vala index fb226702..d9939c8f 100644 --- a/main/src/ui/manage_accounts/dialog.vala +++ b/main/src/ui/manage_accounts/dialog.vala @@ -44,8 +44,10 @@ public class Dialog : Gtk.Dialog { image_button.clicked.connect(show_select_avatar); alias_hybrid.entry.changed.connect(() => { selected_account.alias = alias_hybrid.text; }); password_hybrid.entry.changed.connect(() => { - if (password_hybrid.text != "************") { - selected_account.password = password_hybrid.text; + string? pw_buffer; + pw_buffer = password_hybrid.text; + if (pw_buffer != null && pw_buffer.length > 0 && pw_buffer != "************") { + selected_account.password = pw_buffer; } }); |