fix problem deleting phantom msgs, 209501, r/sr=mscott

This commit is contained in:
bienvenu%nventure.com 2003-09-29 00:33:07 +00:00
Родитель 292f1ffbb8
Коммит f9313634af
1 изменённых файлов: 9 добавлений и 0 удалений

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

@ -3583,6 +3583,15 @@ NS_IMETHODIMP nsMsgDatabase::GetThreadContainingMsgHdr(nsIMsgDBHdr *msgHdr, nsIM
if (threadId != nsMsgKey_None)
*result = GetThreadForThreadId(threadId);
// if we can't find the thread, try using the msg key as the thread id,
// because the msg hdr might not have the thread id set correctly
if (!*result)
{
nsMsgKey msgKey;
NS_ASSERTION(PR_FALSE, "this shouldn't happen");
msgHdr->GetMessageKey(&msgKey);
*result = GetThreadForThreadId(msgKey);
}
return (*result) ? NS_OK : NS_ERROR_FAILURE;
}