diff options
author | Matt A. Tobin <email@mattatobin.com> | 2019-11-10 22:51:10 -0500 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2019-11-10 22:51:10 -0500 |
commit | 5d21f962db500a22697221d985709d5f24fa27f5 (patch) | |
tree | 76abad17d6a77770009f6b19ea3cc2b3cb9e88aa /mailnews/base/search | |
parent | 2fda56a84eca7a08f626704e81b5c4c571623e44 (diff) | |
download | UXP-5d21f962db500a22697221d985709d5f24fa27f5.tar UXP-5d21f962db500a22697221d985709d5f24fa27f5.tar.gz UXP-5d21f962db500a22697221d985709d5f24fa27f5.tar.lz UXP-5d21f962db500a22697221d985709d5f24fa27f5.tar.xz UXP-5d21f962db500a22697221d985709d5f24fa27f5.zip |
Bug 342632 - Allow defaultAccount to return success with nullptr result when there is no usable account.
Tag #1273
Diffstat (limited to 'mailnews/base/search')
-rw-r--r-- | mailnews/base/search/content/searchWidgets.xml | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/mailnews/base/search/content/searchWidgets.xml b/mailnews/base/search/content/searchWidgets.xml index 80ebe38c4..69f3b2ae2 100644 --- a/mailnews/base/search/content/searchWidgets.xml +++ b/mailnews/base/search/content/searchWidgets.xml @@ -224,10 +224,12 @@ let identitiesRaw = MailServices.accounts .getIdentitiesForServer(gFilterList.folder.server); let identities = Array.from(this.fixIterator(identitiesRaw, - Components.interfaces.nsIMsgIdentity)); + Ci.nsIMsgIdentity)); - if (!identities.length) // typically if this is Local Folders - identities.push(MailServices.accounts.defaultAccount.defaultIdentity); + if (identities.length == 0) { // typically if this is Local Folders + if (MailServices.accounts.defaultAccount) + identities.push(MailServices.accounts.defaultAccount.defaultIdentity); + } let templateFound = false; let foldersScanned = []; |