Bug 1272988 - Check for null when detecting outgoing invitations;r=philipp
authormakemyday@gmx-topmail.de
Sun, 15 May 2016 19:55:32 +0200
changeset 19411 0a6bf6158318c122140de23b6bdc322eefaf58fb
parent 19410 602d432f585f54ce0e5b175d2d57a765d93c19e1
child 19412 a68b9dd795941c0cb480ec5809313983b57eeadb
push id11944
push usermakemyday@gmx-topmail.de
push dateWed, 01 Jun 2016 20:49:11 +0000
treeherdercomm-central@0a6bf6158318 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersphilipp
bugs1272988
Bug 1272988 - Check for null when detecting outgoing invitations;r=philipp
calendar/lightning/content/imip-bar.js
--- a/calendar/lightning/content/imip-bar.js
+++ b/calendar/lightning/content/imip-bar.js
@@ -202,16 +202,19 @@ var ltnImipBar = {
             ltnImipBar.actionFunc = actionFunc;
             ltnImipBar.foundItems = foundItems;
         }
 
         // We need this to determine whether this is an outgoing or incoming message because
         // Thunderbird doesn't provide a distinct flag on message level to do so. Relying on
         // folder flags only may lead to false positives.
         let isOutgoing = function(aMsgHdr) {
+            if (!aMsgHdr) {
+                return false;
+            }
             let author = aMsgHdr.mime2DecodedAuthor;
             let isSentFolder = aMsgHdr.folder.flags & nsMsgFolderFlags.SentMail;
             if (author && isSentFolder) {
                 let am = MailServices.accounts;
                 for (let identity in fixIterator(am.allIdentities,
                                                  Components.interfaces.nsIMsgIdentity)) {
                     if (author.includes(identity.email) && !identity.fccReplyFollowParent) {
                         return true;