fix crash clicking away from and back to virtual folder while search going on, sr=mscott, a=asa 273560

This commit is contained in:
bienvenu%nventure.com 2005-04-20 21:25:45 +00:00
Родитель 05839db283
Коммит 8f2fbbfd0d
1 изменённых файлов: 3 добавлений и 2 удалений

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

@ -803,7 +803,7 @@ nsresult nsMsgDBView::SaveAndClearSelection(nsMsgKey *aCurrentMsgKey, nsMsgKeyAr
if (m_saveRestoreSelectionDepth != 1)
return NS_OK;
if (!mTreeSelection)
if (!mTreeSelection || !mTree)
return NS_OK;
// first, freeze selection.
@ -876,7 +876,8 @@ nsresult nsMsgDBView::RestoreSelection(nsMsgKey aCurrentMsgKey, nsMsgKeyArray *a
if (aCurrentMsgKey != nsMsgKey_None)
currentViewPosition = FindKey(aCurrentMsgKey, PR_TRUE);
mTreeSelection->SetCurrentIndex(currentViewPosition);
if (mTree)
mTreeSelection->SetCurrentIndex(currentViewPosition);
// make sure the current message is once again visible in the thread pane
// so we don't have to go search for it in the thread pane