mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-11 16:32:59 +00:00
fix crash if local mail directory is not found
This commit is contained in:
parent
5fd72182a8
commit
24d2b41a6c
@ -44,6 +44,11 @@ NS_IMETHODIMP nsMailDatabase::Open(nsFileSpec &folderName, PRBool create, nsIMsg
|
||||
PRBool newFile = PR_FALSE;
|
||||
nsLocalFolderSummarySpec summarySpec(folderName);
|
||||
|
||||
#ifdef DEBUG_alecf
|
||||
printf("nsMailDatabase::Open(%s, %s, %p, %s) -> %s\n",
|
||||
(const char*)folderName, create ? "TRUE":"FALSE",
|
||||
pMessageDB, upgrading ? "TRUE":"FALSE", (const char*)folderName);
|
||||
#endif
|
||||
nsIDBFolderInfo *folderInfo = NULL;
|
||||
|
||||
*pMessageDB = NULL;
|
||||
@ -121,7 +126,7 @@ NS_IMETHODIMP nsMailDatabase::Open(nsFileSpec &folderName, PRBool create, nsIMsg
|
||||
if (err != NS_OK)
|
||||
{
|
||||
// this will make the db folder info release its ref to the mail db...
|
||||
NS_RELEASE(mailDB->m_dbFolderInfo);
|
||||
NS_IF_RELEASE(mailDB->m_dbFolderInfo);
|
||||
mailDB->Close(PR_TRUE);
|
||||
if (err == NS_MSG_ERROR_FOLDER_SUMMARY_OUT_OF_DATE)
|
||||
summarySpec.Delete(PR_FALSE);
|
||||
|
Loading…
Reference in New Issue
Block a user