fix for #92191. crash in subscribe dialog (which uses outliner).

r=hwaara, sr=hyatt, a=dbaron for 0.9.3


git-svn-id: svn://10.0.0.236/trunk@99988 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
sspitzer%netscape.com 2001-07-27 21:37:27 +00:00
parent dd6a0a2d8c
commit 38d72c6dc7
2 changed files with 24 additions and 20 deletions

View File

@ -1210,17 +1210,19 @@ nsOutlinerBodyFrame::PrefillPropertyArray(PRInt32 aRowIndex, nsOutlinerColumn* a
nsCOMPtr<nsIOutlinerSelection> selection;
mView->GetSelection(getter_AddRefs(selection));
// selected
PRBool isSelected;
selection->IsSelected(aRowIndex, &isSelected);
if (isSelected)
mScratchArray->AppendElement(nsHTMLAtoms::selected);
if (selection) {
// selected
PRBool isSelected;
selection->IsSelected(aRowIndex, &isSelected);
if (isSelected)
mScratchArray->AppendElement(nsHTMLAtoms::selected);
// current
PRInt32 currentIndex;
selection->GetCurrentIndex(&currentIndex);
if (aRowIndex == currentIndex)
mScratchArray->AppendElement(nsXULAtoms::current);
// current
PRInt32 currentIndex;
selection->GetCurrentIndex(&currentIndex);
if (aRowIndex == currentIndex)
mScratchArray->AppendElement(nsXULAtoms::current);
}
// container or leaf
PRBool isContainer = PR_FALSE;

View File

@ -1210,17 +1210,19 @@ nsOutlinerBodyFrame::PrefillPropertyArray(PRInt32 aRowIndex, nsOutlinerColumn* a
nsCOMPtr<nsIOutlinerSelection> selection;
mView->GetSelection(getter_AddRefs(selection));
// selected
PRBool isSelected;
selection->IsSelected(aRowIndex, &isSelected);
if (isSelected)
mScratchArray->AppendElement(nsHTMLAtoms::selected);
if (selection) {
// selected
PRBool isSelected;
selection->IsSelected(aRowIndex, &isSelected);
if (isSelected)
mScratchArray->AppendElement(nsHTMLAtoms::selected);
// current
PRInt32 currentIndex;
selection->GetCurrentIndex(&currentIndex);
if (aRowIndex == currentIndex)
mScratchArray->AppendElement(nsXULAtoms::current);
// current
PRInt32 currentIndex;
selection->GetCurrentIndex(&currentIndex);
if (aRowIndex == currentIndex)
mScratchArray->AppendElement(nsXULAtoms::current);
}
// container or leaf
PRBool isContainer = PR_FALSE;