fix crash searching newsgroup which you've never opened r=alecf 45028

This commit is contained in:
bienvenu%netscape.com 2000-07-10 22:34:08 +00:00
Родитель 8e013f01a6
Коммит 51f8013d94
1 изменённых файлов: 10 добавлений и 7 удалений

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

@ -408,6 +408,8 @@ void nsMsgSearchNews::ReportHits ()
err = scopeFolder->GetDBFolderInfoAndDB(getter_AddRefs(folderInfo), getter_AddRefs(db)); err = scopeFolder->GetDBFolderInfoAndDB(getter_AddRefs(folderInfo), getter_AddRefs(db));
} }
if (db)
{
for (PRUint32 i = 0; i < m_hits.GetSize(); i++) for (PRUint32 i = 0; i < m_hits.GetSize(); i++)
{ {
nsCOMPtr <nsIMsgDBHdr> header; nsCOMPtr <nsIMsgDBHdr> header;
@ -416,6 +418,7 @@ void nsMsgSearchNews::ReportHits ()
if (header) if (header)
ReportHit(header, scopeFolder); ReportHit(header, scopeFolder);
} }
}
} }
// ### this should take an nsIMsgFolder instead of a string location. // ### this should take an nsIMsgFolder instead of a string location.