fix crash in nsMsgFilter::MatchHdr with null folder, check for null folder, r/sr=mscott 218885 and whitespace cleanup

This commit is contained in:
bienvenu%nventure.com 2003-09-11 01:59:44 +00:00
Родитель 33dafeb6d1
Коммит 7bd9c6323b
2 изменённых файлов: 37 добавлений и 36 удалений

Просмотреть файл

@ -434,6 +434,7 @@ NS_IMETHODIMP nsMsgFilter::LogRuleHit(nsIMsgRuleAction *aFilterAction, nsIMsgDBH
NS_IMETHODIMP nsMsgFilter::MatchHdr(nsIMsgDBHdr *msgHdr, nsIMsgFolder *folder, nsIMsgDatabase *db,
const char *headers, PRUint32 headersSize, PRBool *pResult)
{
NS_ENSURE_ARG_POINTER(folder);
// use offlineMail because
nsMsgSearchScopeTerm* scope = new nsMsgSearchScopeTerm(nsnull, nsMsgSearchScope::offlineMail, folder);
if (!scope) return NS_ERROR_OUT_OF_MEMORY;