Bug 1266052 - Crash in nsMsgGroupView::GetCellProperties. r=rkent, a=rkent THUNDERBIRD452b1_2016051723_RELBRANCH
authoralta88
Wed, 20 Apr 2016 08:04:39 -0600
branchTHUNDERBIRD452b1_2016051723_RELBRANCH
changeset 27098 38bd93a68e668d92b9dd80f5893ba2284bbff4a5
parent 27097 05269e463635fd266322f19d481c18a98b157516
child 27099 f401353173f844165e4ba3b016944ffd137be016
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)
reviewersrkent, rkent
bugs1266052
Bug 1266052 - Crash in nsMsgGroupView::GetCellProperties. r=rkent, a=rkent
mailnews/base/src/nsMsgGroupView.cpp
--- a/mailnews/base/src/nsMsgGroupView.cpp
+++ b/mailnews/base/src/nsMsgGroupView.cpp
@@ -745,19 +745,23 @@ NS_IMETHODIMP nsMsgGroupView::GetCellPro
     // Set unread property if a collapsed group thread has unread.
     nsCOMPtr <nsIMsgDBHdr> msgHdr;
     nsresult rv = GetMsgHdrForViewIndex(aRow, getter_AddRefs(msgHdr));
     NS_ENSURE_SUCCESS(rv, rv);
     nsString hashKey;
     rv = HashHdr(msgHdr, hashKey);
     if (NS_FAILED(rv))
       return NS_OK;
+
     nsCOMPtr<nsIMsgThread> msgThread;
     m_groupsTable.Get(hashKey, getter_AddRefs(msgThread));
     nsMsgGroupThread *groupThread = static_cast<nsMsgGroupThread *>(msgThread.get());
+    if (!groupThread)
+      return NS_OK;
+
     uint32_t numUnrMsg = 0;
     groupThread->GetNumUnreadChildren(&numUnrMsg);
     if (numUnrMsg > 0)
       aProperties.AppendLiteral(" hasUnread");
 
     return NS_OK;
   }