diff --git a/mailnews/base/src/nsMsgAccountManager.cpp b/mailnews/base/src/nsMsgAccountManager.cpp index 4589456d887..fc5905cf72e 100644 --- a/mailnews/base/src/nsMsgAccountManager.cpp +++ b/mailnews/base/src/nsMsgAccountManager.cpp @@ -1209,9 +1209,14 @@ NS_IMETHODIMP nsMsgAccountManager::FindAccountForServer(nsIMsgIncomingServer *server, nsIMsgAccount **aResult) { - NS_ENSURE_ARG_POINTER(server); + NS_ENSURE_ARG_POINTER(aResult); + + if (!server) { + (*aResult) = nsnull; + return NS_OK; + } + nsresult rv; - *aResult = nsnull; nsXPIDLCString key; rv = server->GetKey(getter_Copies(key));