fix disabled subject and address fields on reply to e-mail with no pretty name, r=standard8, bug 756971
authorDavid Bienvenu <bienvenu@nventure.com>
Thu, 24 May 2012 16:20:58 -0700
changeset 10261 3b21da7e9effedfcdde0976607dec82a260fa9ca
parent 10260 c322601b7f6154063bd76397185878f621f8d85f
child 10262 b353178d8df609c3e246348d3e71a30e3dbfa217
push id7779
push userbienvenu@nventure.com
push dateThu, 24 May 2012 23:20:46 +0000
treeherdercomm-central@3b21da7e9eff [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersstandard8, bug
bugs756971
fix disabled subject and address fields on reply to e-mail with no pretty name, r=standard8, bug 756971
mail/components/compose/content/MsgComposeCommands.js
--- a/mail/components/compose/content/MsgComposeCommands.js
+++ b/mail/components/compose/content/MsgComposeCommands.js
@@ -3044,16 +3044,18 @@ function addRecipientsToIgnoreList(aAddr
   if (gSpellChecker.enabled)
   {
     // break the list of potentially many recipients back into individual names
     var hdrParser = Components.classes["@mozilla.org/messenger/headerparser;1"].getService(Components.interfaces.nsIMsgHeaderParser);
     var emailAddresses = {};
     var names = {};
     var fullNames = {};
     var numAddresses = hdrParser.parseHeadersWithArray(aAddressesToAdd, emailAddresses, names, fullNames);
+    if (!names)
+      return;
     var tokenizedNames = new Array();
 
     // each name could consist of multiple word delimited by either commas or spaces. i.e. Green Lantern
     // or Lantern,Green. Tokenize on comma first, then tokenize again on spaces.
     for (name in names.value)
     {
       var splitNames = names.value[name].split(',');
       for (let i = 0; i < splitNames.length; i++)