Prevent crash by checking for null frameManager before deref. in UnsuppressAndInvalidate. r=alexsavulov sr=hyatt b=121822

git-svn-id: svn://10.0.0.236/trunk@114451 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
attinasi%netscape.com
2002-02-14 00:15:40 +00:00
parent 5ad5f00454
commit 773c19b934
2 changed files with 22 additions and 16 deletions

View File

@@ -4762,14 +4762,17 @@ PresShell::UnsuppressAndInvalidate()
}
}
mPaintingSuppressed = PR_FALSE;
nsIFrame* rootFrame;
mFrameManager->GetRootFrame(&rootFrame);
if (rootFrame) {
nsRect rect;
rootFrame->GetRect(rect);
if (!rect.IsEmpty()) {
((nsFrame*)rootFrame)->Invalidate(mPresContext, rect, PR_FALSE);
NS_ASSERTION(mFrameManager, "frameManager is already gone");
if (mFrameManager) {
mPaintingSuppressed = PR_FALSE;
nsIFrame* rootFrame;
mFrameManager->GetRootFrame(&rootFrame);
if (rootFrame) {
nsRect rect;
rootFrame->GetRect(rect);
if (!rect.IsEmpty()) {
((nsFrame*)rootFrame)->Invalidate(mPresContext, rect, PR_FALSE);
}
}
}