wallpaper over a zero pointer deref rev2, bug 237421, r/sr=dbaron a=asa

git-svn-id: svn://10.0.0.236/trunk@154111 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bmlk%gmx.de 2004-03-19 17:25:16 +00:00
parent 83388b8dc4
commit 553532d79b
2 changed files with 8 additions and 2 deletions

View File

@ -267,7 +267,10 @@ TableBackgroundPainter::~TableBackgroundPainter()
for (PRUint32 i = 0; i < mNumCols; i++) {
if (mCols[i].mColGroup != lastColGroup) {
lastColGroup = mCols[i].mColGroup;
lastColGroup->Destroy(mPresContext);
NS_ASSERTION(mCols[i].mColGroup, "colgroup data should not be null - bug 237421");
// we need to wallpaper a over zero pointer deref, bug 237421 will have the real fix
if(lastColGroup)
lastColGroup->Destroy(mPresContext);
delete lastColGroup;
}
mCols[i].mColGroup = nsnull;

View File

@ -267,7 +267,10 @@ TableBackgroundPainter::~TableBackgroundPainter()
for (PRUint32 i = 0; i < mNumCols; i++) {
if (mCols[i].mColGroup != lastColGroup) {
lastColGroup = mCols[i].mColGroup;
lastColGroup->Destroy(mPresContext);
NS_ASSERTION(mCols[i].mColGroup, "colgroup data should not be null - bug 237421");
// we need to wallpaper a over zero pointer deref, bug 237421 will have the real fix
if(lastColGroup)
lastColGroup->Destroy(mPresContext);
delete lastColGroup;
}
mCols[i].mColGroup = nsnull;