diff options
Diffstat (limited to 'editor/libeditor/HTMLEditRules.cpp')
-rw-r--r-- | editor/libeditor/HTMLEditRules.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/editor/libeditor/HTMLEditRules.cpp b/editor/libeditor/HTMLEditRules.cpp index c2d61f767..545e22f70 100644 --- a/editor/libeditor/HTMLEditRules.cpp +++ b/editor/libeditor/HTMLEditRules.cpp @@ -4641,7 +4641,11 @@ HTMLEditRules::WillAlign(Selection& aSelection, } nsCOMPtr<nsINode> curParent = curNode->GetParentNode(); - int32_t offset = curParent ? curParent->IndexOf(curNode) : -1; + if (!curParent) { + continue; + } + + int32_t offset = curParent->IndexOf(curNode); // Skip insignificant formatting text nodes to prevent unnecessary // structure splitting! |