fix bug 675598, list reply fails if any identity is missing an e-mail address, r+a=standard8 COMM70_20110911_RELBRANCH
authorDavid Bienvenu <bienvenu@nventure.com>
Thu, 15 Sep 2011 13:46:27 -0700
branchCOMM70_20110911_RELBRANCH
changeset 8468 67b8d58c83edca9d2e0fc9ac55795da13fae4243
parent 8467 be5cbc7dc1696ac697a6dc7cc5eaa2ddecc2a0c7
child 8474 29807edf91f07022ec1d0d9147ded76ac6b3414c
push id135
push userbugzilla@standard8.plus.com
push dateFri, 16 Sep 2011 16:36:03 +0000
treeherdercomm-beta@67b8d58c83ed [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs675598
fix bug 675598, list reply fails if any identity is missing an e-mail address, r+a=standard8
mail/base/content/mailCommands.js
--- a/mail/base/content/mailCommands.js
+++ b/mail/base/content/mailCommands.js
@@ -141,17 +141,18 @@ function getIdentityForHeader(hdr, type)
     // Reverse the array so that the last delivered-to header will show at front.
     deliveredTos.reverse();
 
     // Get the last "delivered-to" that is in the defined identities.
     for (var i = 0; i < deliveredTos.length; i++) {
       for each (var tempID in fixIterator(allIdentities,
                 Components.interfaces.nsIMsgIdentity)) {
         // If the deliver-to header contains the defined identity
-        if (deliveredTos[i].indexOf(tempID.email.toLowerCase()) != -1) {
+        if (tempID.email &&
+            deliveredTos[i].indexOf(tempID.email.toLowerCase()) != -1) {
           hintForIdentity = tempID.email;
           break;
         }
       }
       // Identity has been found
       if (hintForIdentity)
         break;
     }