Source/WebCore: Crash in DeleteSelectionCommand::handleGeneralDelete when attempting...
[WebKit-https.git] / Source / WebCore / editing / DeleteSelectionCommand.cpp
index 27f679f6dbb86a15bb6e75bd171608edb7ca241d..839b73420242027ab5d4f5871fc9b455ea513ba7 100644 (file)
@@ -418,6 +418,8 @@ void DeleteSelectionCommand::handleGeneralDelete()
     if (startNode == m_startBlock && startOffset == 0 && canHaveChildrenForEditing(startNode) && !startNode->hasTagName(tableTag)) {
         startOffset = 0;
         startNode = startNode->traverseNextNode();
+        if (!startNode)
+            return;
     }
 
     if (startOffset >= caretMaxOffset(startNode) && startNode->isTextNode()) {