Reviewed by Ken Kocienda.
[WebKit-https.git] / WebCore / khtml / editing / htmlediting.cpp
index 06c147b7e66f87f4b1a25cbb265b4790d677e692..8a9d21e835e8465094557bd37add115ade2e8c48 100644 (file)
@@ -1476,7 +1476,7 @@ void DeleteSelectionCommand::initializePositionData()
     VisiblePosition visibleEnd(end);
     if (isFirstVisiblePositionOnLine(visibleEnd)) {
         Position previousLineStart = previousLinePosition(visibleEnd, DOWNSTREAM, 0).deepEquivalent();
-        if (RangeImpl::compareBoundaryPoints(previousLineStart, m_downstreamStart) >= 0)
+        if (previousLineStart.isNull() || RangeImpl::compareBoundaryPoints(previousLineStart, m_downstreamStart) >= 0)
             m_mergeBlocksAfterDelete = false;
     }