mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-25 18:07:31 +09:00
Bug 342632 - Allow defaultAccount to return success with nullptr result when there is no usable account.
Tag #1273
This commit is contained in:
parent
07b587d4ed
commit
af2693fe73
11 changed files with 121 additions and 101 deletions
|
|
@ -152,10 +152,13 @@ STDMETHODIMP CMapiImp::Login(unsigned long aUIArg, LOGIN_PW_TYPE aLogin, LOGIN_P
|
|||
nsCOMPtr <nsIMsgAccountManager> accountManager =
|
||||
do_GetService(NS_MSGACCOUNTMANAGER_CONTRACTID, &rv);
|
||||
NS_ENSURE_SUCCESS(rv,MAPI_E_LOGIN_FAILURE);
|
||||
nsCOMPtr <nsIMsgAccount> account;
|
||||
nsCOMPtr <nsIMsgIdentity> identity;
|
||||
nsCOMPtr<nsIMsgAccount> account;
|
||||
rv = accountManager->GetDefaultAccount(getter_AddRefs(account));
|
||||
NS_ENSURE_SUCCESS(rv,MAPI_E_LOGIN_FAILURE);
|
||||
if (!account)
|
||||
return MAPI_E_LOGIN_FAILURE;
|
||||
|
||||
nsCOMPtr<nsIMsgIdentity> identity;
|
||||
rv = account->GetDefaultIdentity(getter_AddRefs(identity));
|
||||
NS_ENSURE_SUCCESS(rv,MAPI_E_LOGIN_FAILURE);
|
||||
if (!identity)
|
||||
|
|
@ -270,6 +273,8 @@ nsresult CMapiImp::GetDefaultInbox(nsIMsgFolder **inboxFolder)
|
|||
nsCOMPtr <nsIMsgAccount> account;
|
||||
rv = accountManager->GetDefaultAccount(getter_AddRefs(account));
|
||||
NS_ENSURE_SUCCESS(rv,rv);
|
||||
if (!account)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
// get incoming server
|
||||
nsCOMPtr <nsIMsgIncomingServer> server;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue