fix regression crash in MoveThreadAt, r/sr=standard8, 492475

This commit is contained in:
David Bienvenu 2009-05-13 10:07:17 -07:00
Родитель 92a459ae77
Коммит 50aa488d44
2 изменённых файлов: 6 добавлений и 6 удалений

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

@ -570,10 +570,10 @@ void nsMsgSearchDBView::MoveThreadAt(nsMsgViewIndex threadIndex)
PRInt32 selectionCount;
PRInt32 currentIndex;
PRBool hasSelection = mTree && mTreeSelection &&
(NS_SUCCEEDED(mTreeSelection->GetCurrentIndex(&currentIndex)) &&
((NS_SUCCEEDED(mTreeSelection->GetCurrentIndex(&currentIndex)) &&
currentIndex >= 0 && currentIndex < GetSize()) ||
(NS_SUCCEEDED(mTreeSelection->GetRangeCount(&selectionCount)) &&
selectionCount > 0);
(NS_SUCCEEDED(mTreeSelection->GetRangeCount(&selectionCount)) &&
selectionCount > 0));
if (hasSelection)

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

@ -763,10 +763,10 @@ void nsMsgThreadedDBView::MoveThreadAt(nsMsgViewIndex threadIndex)
PRInt32 selectionCount;
PRInt32 currentIndex;
PRBool hasSelection = mTree && mTreeSelection &&
(NS_SUCCEEDED(mTreeSelection->GetCurrentIndex(&currentIndex)) &&
((NS_SUCCEEDED(mTreeSelection->GetCurrentIndex(&currentIndex)) &&
currentIndex >= 0 && currentIndex < GetSize()) ||
(NS_SUCCEEDED(mTreeSelection->GetRangeCount(&selectionCount)) &&
selectionCount > 0);
(NS_SUCCEEDED(mTreeSelection->GetRangeCount(&selectionCount)) &&
selectionCount > 0));
if (hasSelection)
SaveAndClearSelection(&preservedKey, preservedSelection);
PRUint32 saveFlags = m_flags[threadIndex];