diff --git a/mailnews/imap/src/nsImapIncomingServer.cpp b/mailnews/imap/src/nsImapIncomingServer.cpp index a41cdd4013a9..8e87be747814 100644 --- a/mailnews/imap/src/nsImapIncomingServer.cpp +++ b/mailnews/imap/src/nsImapIncomingServer.cpp @@ -1685,6 +1685,11 @@ nsresult nsImapIncomingServer::RequestOverrideInfo(nsIMsgWindow *aMsgWindow) if (!((const char *) password) || nsCRT::strlen((const char *) password) == 0) PromptForPassword(getter_Copies(password), aMsgWindow); + + // if we still don't have a password then the user must have hit cancel so just + // fall out... + if (!((const char *) password) || nsCRT::strlen((const char *) password) == 0) + return NS_OK; } rv = m_logonRedirector->Logon(userName, password, logonRedirectorRequester, nsMsgLogonRedirectionServiceIDs::Imap);