Bug 602516 - Either PresShell::Freeze needs to consistently null check mDocument to avoid a crash [@ PresShell::UpdateImageLockingState]. r+a=bz

This commit is contained in:
2010-12-09 20:10:45 +01:00
parent d4b0a20991
commit 61c664e54d

View File

@@ -7478,13 +7478,15 @@ PresShell::Freeze()
mDocument->EnumerateFreezableElements(FreezeElement, nsnull);
if (mCaret)
if (mCaret) {
mCaret->SetCaretVisible(PR_FALSE);
}
mPaintingSuppressed = PR_TRUE;
if (mDocument)
if (mDocument) {
mDocument->EnumerateSubDocuments(FreezeSubDocument, nsnull);
}
nsPresContext* presContext = GetPresContext();
if (presContext &&
@@ -7493,7 +7495,9 @@ PresShell::Freeze()
}
mFrozen = PR_TRUE;
UpdateImageLockingState();
if (mDocument) {
UpdateImageLockingState();
}
}
void