Try to fix topcrash bug 752428 by null-checking the result of nsIPresShell::FrameManager(), which isn't supposed to need it. r=roc

--HG--
extra : transplant_source : %DF%9D%B8%F3%06%C5%85%00%245%FFK%AC%3F%3B%0C%90%3D%EF%A0
This commit is contained in:
L. David Baron 2012-05-07 17:02:01 +02:00
parent 21c21c227a
commit 678686d952

View File

@ -308,10 +308,13 @@ MaybeReflowForInflationScreenWidthChange(nsPresContext *aPresContext)
nsCOMPtr<nsIPresShell> shell;
nsCOMPtr<nsIContentViewer> cv = do_QueryInterface(array[i]);
cv->GetPresShell(getter_AddRefs(shell));
nsIFrame *rootFrame = shell->GetRootFrame();
if (rootFrame) {
shell->FrameNeedsReflow(rootFrame, nsIPresShell::eResize,
NS_FRAME_IS_DIRTY);
nsFrameManager *fm = shell->FrameManager();
if (fm) {
nsIFrame *rootFrame = fm->GetRootFrame();
if (rootFrame) {
shell->FrameNeedsReflow(rootFrame, nsIPresShell::eResize,
NS_FRAME_IS_DIRTY);
}
}
}
}