Bug 540183 - possible crash fix; check for root frame. r=roc

This commit is contained in:
David Bolter 2010-01-20 20:07:35 -05:00
parent ef56830e01
commit 76eb061f48

View File

@ -730,7 +730,11 @@ void nsDocAccessible::GetBoundsRect(nsRect& aBounds, nsIFrame** aRelativeFrame)
if (sf) {
scrollPort = sf->GetScrollPortRect();
} else {
scrollPort = presShell->GetRootFrame()->GetRect();
nsIFrame* rootFrame = presShell->GetRootFrame();
if (!rootFrame) {
return;
}
scrollPort = rootFrame->GetRect();
}
if (parentDoc) { // After first time thru loop