Index: Source/core/editing/ReplaceSelectionCommand.h |
diff --git a/Source/core/editing/ReplaceSelectionCommand.h b/Source/core/editing/ReplaceSelectionCommand.h |
index b6eacc700190dd8efbd28142312af49c2133e8c8..b9f5da64f6f4004e1d9978e89f7a9f973cd1588c 100644 |
--- a/Source/core/editing/ReplaceSelectionCommand.h |
+++ b/Source/core/editing/ReplaceSelectionCommand.h |
@@ -66,8 +66,8 @@ private: |
void didReplaceNode(Node*, Node* newNode); |
Node* firstNodeInserted() const { return m_firstNodeInserted.get(); } |
- Node* lastLeafInserted() const { return m_lastNodeInserted->lastDescendant(); } |
- Node* pastLastLeaf() const { return m_lastNodeInserted ? NodeTraversal::next(lastLeafInserted()) : 0; } |
+ Node& lastLeafInserted() const { ASSERT(m_lastNodeInserted); return m_lastNodeInserted->lastDescendant(); } |
+ Node* pastLastLeaf() const { return m_lastNodeInserted ? NodeTraversal::next(&lastLeafInserted()) : 0; } |
private: |
RefPtr<Node> m_firstNodeInserted; |