# HG changeset patch # User Mark Doliner # Date 1081735486 0 # Node ID 0706d86ecec27accbce8dce5b0d395a04bcda7f3 # Parent dc5f694e1cab050a5bb4f9fa201d965c00b4a329 [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 diff -r dc5f694e1cab -r 0706d86ecec2 src/account.c --- 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"),