Bug 760289 - crash in nsPop3Sink::IncorporateAbort . r=irving
authorMagnus Melin <mkmelin+mozilla@iki.fi>
Mon, 25 Nov 2013 21:18:54 +0200
changeset 16929 8f768cf18b432fec7f1758f98b082d4d021a68e5
parent 16928 a430a521cacfdc5c00b603f09941b29bf9d397f0
child 16930 aae6a4e00030783fdd483bb6278f37eb5778ec7a
push id1074
push userbugzilla@standard8.plus.com
push dateMon, 03 Feb 2014 22:47:23 +0000
treeherdercomm-beta@6b791b5369ed [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersirving
bugs760289
Bug 760289 - crash in nsPop3Sink::IncorporateAbort . r=irving
mailnews/local/src/nsPop3Sink.cpp
--- a/mailnews/local/src/nsPop3Sink.cpp
+++ b/mailnews/local/src/nsPop3Sink.cpp
@@ -855,23 +855,26 @@ nsPop3Sink::IncorporateComplete(nsIMsgWi
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsPop3Sink::IncorporateAbort(bool uidlDownload)
 {
   nsresult rv = m_outFileStream->Close();
   NS_ENSURE_SUCCESS(rv,rv);
-  if (!m_downloadingToTempFile && m_msgStore)
+  if (!m_downloadingToTempFile && m_msgStore && m_newMailParser &&
+      m_newMailParser->m_newMsgHdr)
+  {
       m_msgStore->DiscardNewMessage(m_outFileStream,
                                     m_newMailParser->m_newMsgHdr);
+  }
 #ifdef DEBUG
-    printf("Incorporate message abort.\n");
+  printf("Incorporate message abort.\n");
 #endif
-    return rv;
+  return rv;
 }
 
 nsresult
 nsPop3Sink::BiffGetNewMail()
 {
 #ifdef DEBUG
     printf("Biff get new mail.\n");
 #endif