Bug 96108: Bustage noticed by mscott in checkin (would crash). jst and

waterson say go for it.
This commit is contained in:
rjesup%wgate.com 2001-12-21 01:54:59 +00:00
parent 7f6ba9a292
commit dad6f73f5d

View File

@ -1727,9 +1727,10 @@ nsIMAPMessagePartIDArray::~nsIMAPMessagePartIDArray()
void nsIMAPMessagePartIDArray::RemoveAndFreeAll()
{
while (Count() > 0)
int n = Count();
for (int i = 0; i < n; i++)
{
nsIMAPMessagePartID *part = GetPart(0);
nsIMAPMessagePartID *part = GetPart(i);
delete part;
}
Clear();