Bug 283223: stop creating new accounts from nsAccountManager::GetAccount if no

account is found matching the provided key (preferring to return null instead).
r=bienvenu,sr=mscott.


git-svn-id: svn://10.0.0.236/trunk@169849 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
shaver%mozilla.org
2005-02-25 13:59:22 +00:00
parent 3554935af3
commit 20afa07628
5 changed files with 64 additions and 38 deletions

View File

@@ -1734,6 +1734,11 @@ function GenericSendMessage( msgType )
// check if the user tries to send a message to a newsgroup through a mail account
var currentAccountKey = getCurrentAccountKey();
var account = gAccountManager.getAccount(currentAccountKey);
if (!account)
{
throw "UNEXPECTED: currentAccountKey '" + currentAccountKey +
"' has no matching account!";
}
var servertype = account.incomingServer.type;
if (servertype != "nntp" && msgCompFields.newsgroups != "")