Mercurial > pidgin.yaz
changeset 8638:0706d86ecec2
[gaim-migrate @ 9390]
Fix http://sourceforge.net/tracker/index.php?func=detail&aid=932986&group_id=235&atid=100235
"Change Password Crash" (when leaving a field empty)
I made the 3 fields in the change password dialog mandatory, and then
I added a check for null values, just to be double sure.
Chip, is it bad that stuff using the request API can get NULL like
that? It seems like it might be better if stuff just got an empty
string? I dunno
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Mon, 12 Apr 2004 02:04:46 +0000 |
parents | dc5f694e1cab |
children | 119e8c15bf44 |
files | src/account.c |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/account.c Mon Apr 12 01:37:18 2004 +0000 +++ b/src/account.c Mon Apr 12 02:04:46 2004 +0000 @@ -281,7 +281,8 @@ return; } - if (*orig_pass == '\0' || *new_pass_1 == '\0' || *new_pass_2 == '\0') + if (orig_pass == NULL || new_pass_1 == NULL || new_pass_2 == NULL || + *orig_pass == '\0' || *new_pass_1 == '\0' || *new_pass_2 == '\0') { gaim_notify_error(NULL, NULL, _("Fill out all fields completely."), NULL); @@ -312,18 +313,21 @@ field = gaim_request_field_string_new("password", _("Original password"), NULL, FALSE); gaim_request_field_string_set_masked(field, TRUE); + gaim_request_field_set_required(field, TRUE); gaim_request_field_group_add_field(group, field); field = gaim_request_field_string_new("new_password_1", _("New password"), NULL, FALSE); gaim_request_field_string_set_masked(field, TRUE); + gaim_request_field_set_required(field, TRUE); gaim_request_field_group_add_field(group, field); field = gaim_request_field_string_new("new_password_2", _("New password (again)"), NULL, FALSE); gaim_request_field_string_set_masked(field, TRUE); + gaim_request_field_set_required(field, TRUE); gaim_request_field_group_add_field(group, field); g_snprintf(primary, sizeof(primary), _("Change password for %s"),