nsCOMArray::RemoveObjectAt fails to remove nulls correctly. Bug 265772,

r=darin, sr=dbaron


git-svn-id: svn://10.0.0.236/trunk@164279 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bzbarsky%mit.edu
2004-10-24 17:24:25 +00:00
parent 9d81bbd030
commit ae2660d433

View File

@@ -135,13 +135,10 @@ PRBool
nsCOMArray_base::RemoveObjectAt(PRInt32 aIndex)
{
nsISupports* element = ObjectAt(aIndex);
if (element) {
PRBool result = mArray.RemoveElementAt(aIndex);
if (result)
NS_IF_RELEASE(element);
return result;
}
return PR_FALSE;
PRBool result = mArray.RemoveElementAt(aIndex);
if (result)
NS_IF_RELEASE(element);
return result;
}
// useful for destructors