fix bug 675598, list reply fails if any identity is missing an e-mail address, r=standard8
authorDavid Bienvenu <bienvenu@nventure.com>
Thu, 15 Sep 2011 13:46:27 -0700
changeset 8494 fb476890accb0e2d537f786c288ed047263df082
parent 8493 9c606884c53edad5bf221706082ef152f304664e
child 8495 78f4eb144c90811f22f16ee20d79ebfdf08f4df9
push id6522
push userbienvenu@nventure.com
push dateThu, 15 Sep 2011 20:46:31 +0000
treeherdercomm-central@fb476890accb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersstandard8
bugs675598
fix bug 675598, list reply fails if any identity is missing an e-mail address, r=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;
     }