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:
parent
c865cd2a92
commit
95201415ad
@ -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;
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user