diff options
Diffstat (limited to 'mailnews/local/src')
-rw-r--r-- | mailnews/local/src/nsMsgMaildirStore.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/mailnews/local/src/nsMsgMaildirStore.cpp b/mailnews/local/src/nsMsgMaildirStore.cpp index 993abbad5..6f3228938 100644 --- a/mailnews/local/src/nsMsgMaildirStore.cpp +++ b/mailnews/local/src/nsMsgMaildirStore.cpp @@ -1194,6 +1194,7 @@ MaildirStoreParser::~MaildirStoreParser() nsresult MaildirStoreParser::ParseNextMessage(nsIFile *aFile) { nsresult rv; + NS_ENSURE_TRUE(m_db, NS_ERROR_NULL_POINTER); nsCOMPtr<nsIInputStream> inputStream; nsCOMPtr<nsIMsgParseMailMsgState> msgParser = do_CreateInstance(NS_PARSEMAILMSGSTATE_CONTRACTID, &rv); @@ -1278,9 +1279,10 @@ void MaildirStoreParser::TimerCallback(nsITimer *aTimer, void *aClosure) parser->m_directoryEnumerator->GetNext(getter_AddRefs(aSupport)); nsresult rv; nsCOMPtr<nsIFile> currentFile(do_QueryInterface(aSupport, &rv)); - NS_ENSURE_SUCCESS_VOID(rv); - parser->ParseNextMessage(currentFile); - // ### TODO - what if this fails? + if (NS_SUCCEEDED(rv)) + rv = parser->ParseNextMessage(currentFile); + if (NS_FAILED(rv) && parser->m_listener) + parser->m_listener->OnStopRunningUrl(nullptr, NS_ERROR_FAILURE); } nsresult MaildirStoreParser::StartTimer() |