From cc75249f74077e6eb9dc0f0d19c8842bea26567e Mon Sep 17 00:00:00 2001 From: "naving%netscape.com" Date: Fri, 22 Jun 2001 00:57:08 +0000 Subject: [PATCH] 85228 r=suresh sr=mscott a=chofmann; check for null git-svn-id: svn://10.0.0.236/trunk@97707 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/mailnews/local/src/nsPop3Protocol.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/mozilla/mailnews/local/src/nsPop3Protocol.cpp b/mozilla/mailnews/local/src/nsPop3Protocol.cpp index 10a669fde2d..2f1721266cc 100644 --- a/mozilla/mailnews/local/src/nsPop3Protocol.cpp +++ b/mozilla/mailnews/local/src/nsPop3Protocol.cpp @@ -555,8 +555,8 @@ nsresult nsPop3Protocol::GetPassword(char ** aPassword, PRBool *okayValue) } // otherwise this is the first time we've asked about the server's password so show a first time prompt else mStringService->GetStringByID(POP3_ENTER_PASSWORD_PROMPT, getter_Copies(passwordTemplate)); - - passwordPromptString = nsTextFormatter::smprintf(passwordTemplate, (const char *) userName, (const char *) hostName); + if (passwordTemplate) + passwordPromptString = nsTextFormatter::smprintf(passwordTemplate, (const char *) userName, (const char *) hostName); // now go get the password!!!! nsCOMPtr mailnewsUrl = do_QueryInterface(m_url, &rv); if (NS_FAILED(rv)) return rv; @@ -567,8 +567,9 @@ nsresult nsPop3Protocol::GetPassword(char ** aPassword, PRBool *okayValue) mStringService->GetStringByID(POP3_ENTER_PASSWORD_PROMPT_TITLE, getter_Copies(passwordTitle)); if (passwordPromptString) { - rv = server->GetPasswordWithUI(passwordPromptString, passwordTitle.get(), - aMsgWindow, okayValue, aPassword); + if (passwordTitle) + rv = server->GetPasswordWithUI(passwordPromptString, passwordTitle.get(), + aMsgWindow, okayValue, aPassword); nsTextFormatter::smprintf_free(passwordPromptString); }