Index: Source/core/editing/InsertListCommand.cpp |
diff --git a/Source/core/editing/InsertListCommand.cpp b/Source/core/editing/InsertListCommand.cpp |
index 9ad50f6c0fa3954af9f4c7b3d439715462dd97c6..c69d02ec9a8339d97bb4278dd3be230881867462 100644 |
--- a/Source/core/editing/InsertListCommand.cpp |
+++ b/Source/core/editing/InsertListCommand.cpp |
@@ -172,7 +172,7 @@ void InsertListCommand::doApply() |
// If endOfSelection is null, then some contents have been deleted from the document. |
// This should never happen and if it did, exit early immediately because we've lost the loop invariant. |
ASSERT(endOfSelection.isNotNull()); |
- if (endOfSelection.isNull()) |
+ if (endOfSelection.isNull() || !endOfSelection.rootEditableElement()) |
return; |
startOfLastParagraph = startOfParagraph(endOfSelection, CanSkipOverEditingBoundary); |
} |