Reviewed by John
[WebKit-https.git] / WebCore / khtml / editing / htmlediting.cpp
index 493f85a..cf1e10e 100644 (file)
@@ -3907,6 +3907,7 @@ ReplaceSelectionCommand::~ReplaceSelectionCommand()
 void ReplaceSelectionCommand::doApply()
 {
     Selection selection = endingSelection();
+    ASSERT(selection.isCaretOrRange());
     VisiblePosition visibleStart(selection.start());
     VisiblePosition visibleEnd(selection.end());
     bool startAtStartOfBlock = isFirstVisiblePositionInBlock(visibleStart);