summaryrefslogtreecommitdiff
path: root/mailnews/import
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2019-11-10 22:51:10 -0500
committerMatt A. Tobin <email@mattatobin.com>2019-11-10 22:51:10 -0500
commit5d21f962db500a22697221d985709d5f24fa27f5 (patch)
tree76abad17d6a77770009f6b19ea3cc2b3cb9e88aa /mailnews/import
parent2fda56a84eca7a08f626704e81b5c4c571623e44 (diff)
downloaduxp-5d21f962db500a22697221d985709d5f24fa27f5.tar.gz
Bug 342632 - Allow defaultAccount to return success with nullptr result when there is no usable account.
Tag #1273
Diffstat (limited to 'mailnews/import')
-rw-r--r--mailnews/import/becky/src/nsBeckyFilters.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/mailnews/import/becky/src/nsBeckyFilters.cpp b/mailnews/import/becky/src/nsBeckyFilters.cpp
index 517a18014d..97b99fec2f 100644
--- a/mailnews/import/becky/src/nsBeckyFilters.cpp
+++ b/mailnews/import/becky/src/nsBeckyFilters.cpp
@@ -770,9 +770,16 @@ nsBeckyFilters::CollectServers()
nsCOMPtr<nsIMsgAccount> defaultAccount;
rv = accountManager->GetDefaultAccount(getter_AddRefs(defaultAccount));
NS_ENSURE_SUCCESS(rv, rv);
+ if (defaultAccount)
+ return defaultAccount->GetIncomingServer(getter_AddRefs(mServer));
- nsCOMPtr<nsIMsgIncomingServer> server;
- return defaultAccount->GetIncomingServer(getter_AddRefs(mServer));
+ // We can also import filters into the Local Folders account.
+ rv = accountManager->GetLocalFoldersServer(getter_AddRefs(mServer));
+ NS_ENSURE_SUCCESS(rv, rv);
+ if (!mServer)
+ return NS_ERROR_UNEXPECTED;
+
+ return NS_OK;
}
nsresult