Index: Source/core/editing/ReplaceSelectionCommand.h |
diff --git a/Source/core/editing/ReplaceSelectionCommand.h b/Source/core/editing/ReplaceSelectionCommand.h |
index d286fc2a394d1280916cd9e23fd75004ec5236a8..4173df556bbc9ea5d7d707f9bbc7c569135e2185 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 { ASSERT(m_lastNodeInserted); return m_lastNodeInserted->lastDescendant(); } |
- Node* pastLastLeaf() const { return m_lastNodeInserted ? NodeTraversal::next(lastLeafInserted()) : 0; } |
+ Node* lastLeafInserted() const { return m_lastNodeInserted ? &m_lastNodeInserted->lastDescendant() : 0; } |
+ Node* pastLastLeaf() const { return m_lastNodeInserted ? NodeTraversal::next(*lastLeafInserted()) : 0; } |
private: |
RefPtr<Node> m_firstNodeInserted; |