Index: Source/core/editing/InsertLineBreakCommand.cpp |
diff --git a/Source/core/editing/InsertLineBreakCommand.cpp b/Source/core/editing/InsertLineBreakCommand.cpp |
index 157656710a3a794e8a4d9c2377e8fba7c03d060a..5270238d9484c1824f62e95d00a0d919b2ccc811 100644 |
--- a/Source/core/editing/InsertLineBreakCommand.cpp |
+++ b/Source/core/editing/InsertLineBreakCommand.cpp |
@@ -97,13 +97,13 @@ |
if (needExtraLineBreak) |
insertNodeBefore(nodeToInsert->cloneNode(false), nodeToInsert); |
- VisiblePosition endingPosition(positionBeforeNode(*nodeToInsert)); |
+ VisiblePosition endingPosition(positionBeforeNode(nodeToInsert.get())); |
setEndingSelection(VisibleSelection(endingPosition, endingSelection().isDirectional())); |
} else if (pos.deprecatedEditingOffset() <= caretMinOffset(pos.deprecatedNode())) { |
insertNodeAt(nodeToInsert.get(), pos); |
// Insert an extra br or '\n' if the just inserted one collapsed. |
- if (!isStartOfParagraph(VisiblePosition(positionBeforeNode(*nodeToInsert)))) |
+ if (!isStartOfParagraph(VisiblePosition(positionBeforeNode(nodeToInsert.get())))) |
insertNodeBefore(nodeToInsert->cloneNode(false).get(), nodeToInsert.get()); |
setEndingSelection(VisibleSelection(positionInParentAfterNode(*nodeToInsert), DOWNSTREAM, endingSelection().isDirectional())); |