fix 239168 junk mail controls not run on inbox if inbox is also fcc folder, sr=mscott, also fix crash when getnewlist returns null

This commit is contained in:
bienvenu%nventure.com 2004-10-19 01:16:26 +00:00
parent 3a3639f706
commit 1ac18e39d3

View File

@ -444,7 +444,7 @@ NS_IMETHODIMP nsMsgDBFolder::ClearNewMessages()
{
nsMsgKeyArray *newMessageKeys = nsnull;
rv = mDatabase->GetNewList(&newMessageKeys);
if (NS_SUCCEEDED(rv))
if (NS_SUCCEEDED(rv) && newMessageKeys)
m_saveNewMsgs.CopyArray(newMessageKeys);
NS_DELETEXPCOM (newMessageKeys);
rv = mDatabase->ClearNewList(PR_TRUE);
@ -1814,7 +1814,8 @@ nsMsgDBFolder::CallFilterPlugins(nsIMsgWindow *aMsgWindow, PRBool *aFiltersRun)
if (mFlags & (MSG_FOLDER_FLAG_JUNK | MSG_FOLDER_FLAG_TRASH |
MSG_FOLDER_FLAG_SENTMAIL | MSG_FOLDER_FLAG_QUEUE |
MSG_FOLDER_FLAG_DRAFTS | MSG_FOLDER_FLAG_TEMPLATES |
MSG_FOLDER_FLAG_IMAP_PUBLIC | MSG_FOLDER_FLAG_IMAP_OTHER_USER))
MSG_FOLDER_FLAG_IMAP_PUBLIC | MSG_FOLDER_FLAG_IMAP_OTHER_USER)
&& !(mFlags & MSG_FOLDER_FLAG_INBOX))
return NS_OK;
nsresult rv = GetServer(getter_AddRefs(server));