summaryrefslogtreecommitdiffstats
path: root/account.c
diff options
context:
space:
mode:
authorBrendan Cully <brendan@kublai.com>2005-07-17 00:43:05 +0000
committerBrendan Cully <brendan@kublai.com>2005-07-17 00:43:05 +0000
commitb5cf50bf973284f0035fcfd18fe621d69626d977 (patch)
treee9d94a08e20ded27c0f7b98b74dd7ae89b925cc1 /account.c
parent3f57f4fb88113170840b819899a52124c4a26072 (diff)
Don't dereference null ImapUser in new getlogin function.
Diffstat (limited to 'account.c')
-rw-r--r--account.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/account.c b/account.c
index 3b4a4fa9..a71746b7 100644
--- a/account.c
+++ b/account.c
@@ -172,8 +172,10 @@ int mutt_account_getlogin (ACCOUNT* account)
{
if (ImapLogin)
strfcpy (account->login, ImapLogin, sizeof (account->login));
- else
- strfcpy (account->login, ImapUser, sizeof (account->login));
+ else {
+ mutt_account_getuser (account);
+ strfcpy (account->login, account->user, sizeof (account->login));
+ }
}
#endif