bug 151888 - use SafeElementAt as we use it in all other places r=karnaze sr=kin

git-svn-id: svn://10.0.0.236/trunk@123997 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bernd.mielke%snafu.de 2002-06-25 06:58:49 +00:00
parent c865cd2a92
commit 95201415ad
2 changed files with 8 additions and 6 deletions

View File

@ -1918,7 +1918,7 @@ void nsCellMap::RebuildConsideringCells(nsTableCellMap& aMap,
}
}
// put in the original cell from the cell map
CellData* data = (CellData*) row->ElementAt(colX);
CellData* data = (CellData*) row->SafeElementAt(colX);
if (data && data->IsOrig()) {
AppendCell(aMap, data->GetCellFrame(), rowX, PR_FALSE, aDamageArea);
}
@ -1936,8 +1936,9 @@ void nsCellMap::RebuildConsideringCells(nsTableCellMap& aMap,
nsVoidArray* row = (nsVoidArray *)origRows[rowX];
PRInt32 len = row->Count();
for (PRInt32 colX = 0; colX < len; colX++) {
CellData* data = (CellData*) row->ElementAt(colX);
delete data;
CellData* data = (CellData*) row->SafeElementAt(colX);
if(data)
delete data;
}
delete row;
}

View File

@ -1918,7 +1918,7 @@ void nsCellMap::RebuildConsideringCells(nsTableCellMap& aMap,
}
}
// put in the original cell from the cell map
CellData* data = (CellData*) row->ElementAt(colX);
CellData* data = (CellData*) row->SafeElementAt(colX);
if (data && data->IsOrig()) {
AppendCell(aMap, data->GetCellFrame(), rowX, PR_FALSE, aDamageArea);
}
@ -1936,8 +1936,9 @@ void nsCellMap::RebuildConsideringCells(nsTableCellMap& aMap,
nsVoidArray* row = (nsVoidArray *)origRows[rowX];
PRInt32 len = row->Count();
for (PRInt32 colX = 0; colX < len; colX++) {
CellData* data = (CellData*) row->ElementAt(colX);
delete data;
CellData* data = (CellData*) row->SafeElementAt(colX);
if(data)
delete data;
}
delete row;
}