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

This commit is contained in:
darin%meer.net 2005-08-18 11:16:55 +00:00
parent 41f3b5f8a9
commit 8b73005309

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;
}