Fix crash in ~nsCOMArrayEnumerator. Bug 181592, r=alecf, sr=scc

git-svn-id: svn://10.0.0.236/trunk@134462 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bzbarsky%mit.edu
2002-11-26 18:57:56 +00:00
parent 512e484870
commit b5fe6e003d

View File

@@ -132,8 +132,8 @@ NS_IMPL_ISUPPORTS1(nsCOMArrayEnumerator, nsISimpleEnumerator)
nsCOMArrayEnumerator::~nsCOMArrayEnumerator()
{
// only release the entries that we haven't visited yet
while (mIndex < mArraySize) {
NS_IF_RELEASE(mValueArray[mIndex++]);
for (; mIndex < mArraySize; ++mIndex) {
NS_IF_RELEASE(mValueArray[mIndex]);
}
}