mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1113121 - Null check the parent node in nsHTMLEditRules::JoinNodesSmart() before passing it to MoveNode; r=roc
This commit is contained in:
parent
c83a3c2ef3
commit
dfa5fdf674
@ -7398,7 +7398,8 @@ nsHTMLEditRules::JoinNodesSmart(nsIContent& aNodeLeft, nsIContent& aNodeRight)
|
||||
{
|
||||
// Caller responsible for left and right node being the same type
|
||||
nsCOMPtr<nsINode> parent = aNodeLeft.GetParentNode();
|
||||
int32_t parOffset = parent ? parent->IndexOf(&aNodeLeft) : -1;
|
||||
NS_ENSURE_STATE(parent);
|
||||
int32_t parOffset = parent->IndexOf(&aNodeLeft);
|
||||
nsCOMPtr<nsINode> rightParent = aNodeRight.GetParentNode();
|
||||
|
||||
// If they don't have the same parent, first move the right node to after the
|
||||
|
Loading…
Reference in New Issue
Block a user