Bug 539531 - Crash when I click-and-drag on a "Gordon" flash emulation [@ nsFrameSelection::ConstrainFrameAndPointToAnchorSubtree(nsIFrame*, nsPoint&, nsIFrame**, nsPoint&) ]. r=bz

This commit is contained in:
Masayuki Nakano
2010-01-20 11:22:09 +01:00
parent 35c1192b1f
commit 71fed74b78
3 changed files with 7 additions and 2 deletions

View File

@@ -394,7 +394,9 @@ nsINode::GetSelectionRootContent(nsIPresShell* aPresShell)
if (!IsNodeOfType(eCONTENT))
return nsnull;
NS_ENSURE_TRUE(GetCurrentDoc() == aPresShell->GetDocument(), nsnull);
if (GetCurrentDoc() != aPresShell->GetDocument()) {
return nsnull;
}
nsIFrame* frame = static_cast<nsIContent*>(this)->GetPrimaryFrame();
if (frame && frame->GetStateBits() & NS_FRAME_INDEPENDENT_SELECTION) {