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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user