зеркало из https://github.com/mozilla/gecko-dev.git
84767 r=suresh sr=mscott a=blizzard; make sure m_curFilter is not null. m_curFilter
may be null if there is no name for a filter in rules.dat.
This commit is contained in:
Родитель
e8ff63b0bb
Коммит
43a63d53b9
|
@ -507,25 +507,28 @@ nsresult nsMsgFilterList::LoadTextFilters(nsIOFileStream *aStream)
|
|||
m_curFilter->SetFilterScript(&value);
|
||||
break;
|
||||
case nsIMsgFilterList::attribAction:
|
||||
m_curFilter->m_action.m_type = nsMsgFilter::GetActionForFilingStr(value);
|
||||
break;
|
||||
if (m_curFilter)
|
||||
m_curFilter->m_action.m_type = nsMsgFilter::GetActionForFilingStr(value);
|
||||
break;
|
||||
case nsIMsgFilterList::attribActionValue:
|
||||
if (m_curFilter->m_action.m_type == nsMsgFilterAction::MoveToFolder)
|
||||
err = m_curFilter->ConvertMoveToFolderValue(value);
|
||||
else if (m_curFilter->m_action.m_type == nsMsgFilterAction::ChangePriority)
|
||||
{
|
||||
nsMsgPriorityValue outPriority;
|
||||
nsresult res = NS_MsgGetPriorityFromString(value.get(), &outPriority);
|
||||
if (NS_SUCCEEDED(res))
|
||||
{
|
||||
m_curFilter->SetAction(m_curFilter->m_action.m_type);
|
||||
m_curFilter->SetActionPriority(outPriority);
|
||||
}
|
||||
else
|
||||
NS_ASSERTION(PR_FALSE, "invalid priority in filter file");
|
||||
|
||||
}
|
||||
break;
|
||||
if (m_curFilter)
|
||||
{
|
||||
if (m_curFilter->m_action.m_type == nsMsgFilterAction::MoveToFolder)
|
||||
err = m_curFilter->ConvertMoveToFolderValue(value);
|
||||
else if (m_curFilter->m_action.m_type == nsMsgFilterAction::ChangePriority)
|
||||
{
|
||||
nsMsgPriorityValue outPriority;
|
||||
nsresult res = NS_MsgGetPriorityFromString(value.get(), &outPriority);
|
||||
if (NS_SUCCEEDED(res))
|
||||
{
|
||||
m_curFilter->SetAction(m_curFilter->m_action.m_type);
|
||||
m_curFilter->SetActionPriority(outPriority);
|
||||
}
|
||||
else
|
||||
NS_ASSERTION(PR_FALSE, "invalid priority in filter file");
|
||||
}
|
||||
}
|
||||
break;
|
||||
case nsIMsgFilterList::attribCondition:
|
||||
err = ParseCondition(value);
|
||||
break;
|
||||
|
|
Загрузка…
Ссылка в новой задаче