diff --git a/mozilla/layout/base/nsPresShell.cpp b/mozilla/layout/base/nsPresShell.cpp index 74cda16ae40..cc8bf850fa1 100644 --- a/mozilla/layout/base/nsPresShell.cpp +++ b/mozilla/layout/base/nsPresShell.cpp @@ -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); + } } } diff --git a/mozilla/layout/html/base/src/nsPresShell.cpp b/mozilla/layout/html/base/src/nsPresShell.cpp index 74cda16ae40..cc8bf850fa1 100644 --- a/mozilla/layout/html/base/src/nsPresShell.cpp +++ b/mozilla/layout/html/base/src/nsPresShell.cpp @@ -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); + } } }