Bug 1272988 - Check for null when detecting outgoing invitations;r+a=philipp
authormakemyday@gmx-topmail.de
Wed, 01 Jun 2016 22:45:32 +0200
changeset 27207 5b0a987ce1965179956cc5262f3272ea1adc0861
parent 27206 2efd26dbfe6bf08189c3b1eb28d38284b47600de
child 27208 1057658a4ce78aaad831c788493acf181f80f37c
push id1850
push userclokep@gmail.com
push dateWed, 08 Mar 2017 19:29:12 +0000
treeherdercomm-esr52@028df196b2d9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1272988
Bug 1272988 - Check for null when detecting outgoing invitations;r+a=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;