Bug 1156062 - Bustage follow up fix on a CLOSED TREE, a=tomcat

--HG--
extra : amend_source : 7783f17a038f6d8ebc4fe03cb1f29cd52d272259
This commit is contained in:
Aryeh Gregor 2016-04-19 16:44:49 +02:00
parent 71153b052c
commit f720349666

View File

@ -4583,8 +4583,7 @@ nsHTMLEditRules::WillAlign(Selection& aSelection,
if (emptyDiv) {
NS_ENSURE_STATE(aSelection.GetRangeAt(0) &&
aSelection.GetRangeAt(0)->GetStartParent());
OwningNonNull<nsINode> parent =
*aSelection.GetRangeAt(0)->GetStartParent();
nsCOMPtr<nsINode> parent = aSelection.GetRangeAt(0)->GetStartParent();
int32_t offset = aSelection.GetRangeAt(0)->StartOffset();
rv = SplitAsNeeded(*nsGkAtoms::div, parent, offset);