fixes bug 262183 "FFTrunk and Trunk crash [@ nsSHEntry::GetChildAt]" r=biesi sr=bzbarsky

git-svn-id: svn://10.0.0.236/trunk@162995 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
darin%meer.net
2004-09-30 05:15:38 +00:00
parent 9a1f5e11a8
commit a17351e47b

View File

@@ -393,7 +393,9 @@ nsSHEntry::GetChildAt(PRInt32 aIndex, nsISHEntry ** aResult)
{
if (aIndex >= 0 && aIndex < mChildren.Count()) {
*aResult = mChildren[aIndex];
NS_ADDREF(*aResult);
// yes, mChildren can have holes in it. AddChild's offset parameter makes
// that possible.
NS_IF_ADDREF(*aResult);
} else {
*aResult = nsnull;
}