Bug 1113121 - Null check the parent node in nsHTMLEditRules::JoinNodesSmart() before passing it to MoveNode; r=roc

This commit is contained in:
Ehsan Akhgari 2015-01-12 13:05:56 -05:00
parent c83a3c2ef3
commit dfa5fdf674

View File

@ -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