Bug 1506613 - Check parser_>m_db for null in MaildirStoreParser::TimerCallback to avoid crash. r=mkmelin a=jorgk THUNDERBIRD_60_7_1_BUILD1 THUNDERBIRD_60_7_1_RELEASE
authoraceman <acelists@atlas.sk>
Tue, 11 Jun 2019 22:54:08 +0200
changeset 32215 a9f99cffa752340d368ddf90ba813c44c82eafce
parent 32214 a819a3a05f2109a7704d76267db248aaa972212f
child 32216 a39110df69adda1b83bb539d90587db66e0e1914
push id194
push usermozilla@jorgk.com
push dateTue, 11 Jun 2019 20:56:46 +0000
treeherdercomm-esr60@a9f99cffa752 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmkmelin, jorgk
bugs1506613
Bug 1506613 - Check parser_>m_db for null in MaildirStoreParser::TimerCallback to avoid crash. r=mkmelin a=jorgk
mailnews/local/src/nsMsgMaildirStore.cpp
--- a/mailnews/local/src/nsMsgMaildirStore.cpp
+++ b/mailnews/local/src/nsMsgMaildirStore.cpp
@@ -1234,18 +1234,18 @@ void MaildirStoreParser::TimerCallback(n
   MaildirStoreParser *parser = (MaildirStoreParser *) aClosure;
   bool hasMore;
   parser->m_directoryEnumerator->HasMoreElements(&hasMore);
   if (!hasMore)
   {
     nsCOMPtr<nsIMsgPluggableStore> store;
     parser->m_folder->GetMsgStore(getter_AddRefs(store));
     parser->m_timer->Cancel();
-    parser->m_db->SetSummaryValid(true);
-//    store->SetSummaryFileValid(parser->m_folder, parser->m_db, true);
+    if (parser->m_db) parser->m_db->SetSummaryValid(true);
+    // store->SetSummaryFileValid(parser->m_folder, parser->m_db, true);
     if (parser->m_listener)
     {
       nsresult rv;
       nsCOMPtr<nsIMailboxUrl> mailboxurl =
         do_CreateInstance(NS_MAILBOXURL_CONTRACTID, &rv);
       if (NS_SUCCEEDED(rv) && mailboxurl)
       {
         nsCOMPtr<nsIMsgMailNewsUrl> url = do_QueryInterface(mailboxurl);