Don't crash on triple-clicking when there's an orphan content somewhere. bug=370174 r+sr=roc blocking1.9=dbaron

git-svn-id: svn://10.0.0.236/trunk@246323 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
uriber%gmail.com
2008-02-22 21:21:15 +00:00
parent c175001aed
commit 31501ac213

View File

@@ -4540,8 +4540,9 @@ FindBlockFrameOrBR(nsIFrame* aFrame, nsDirection aDirection)
aFrame->GetType() == nsGkAtoms::brFrame) {
nsIContent* content = aFrame->GetContent();
result.mContent = content->GetParent();
result.mOffset = result.mContent->IndexOf(content) +
(aDirection == eDirPrevious ? 1 : 0);
if (result.mContent)
result.mOffset = result.mContent->IndexOf(content) +
(aDirection == eDirPrevious ? 1 : 0);
return result;
}