Index: Source/core/editing/InsertTextCommand.cpp |
diff --git a/Source/core/editing/InsertTextCommand.cpp b/Source/core/editing/InsertTextCommand.cpp |
index 5d3d91513ab86deac1993a282b216d92dea1cce3..0d6e03f61acffe413df8ceb3e5026ca34a2d8f61 100644 |
--- a/Source/core/editing/InsertTextCommand.cpp |
+++ b/Source/core/editing/InsertTextCommand.cpp |
@@ -229,6 +229,8 @@ void InsertTextCommand::doApply() |
Position InsertTextCommand::insertTab(const Position& pos) |
{ |
Position insertPos = VisiblePosition(pos, DOWNSTREAM).deepEquivalent(); |
+ if (insertPos.isNull()) |
+ return pos; |
Node* node = insertPos.containerNode(); |
unsigned offset = node->isTextNode() ? insertPos.offsetInContainerNode() : 0; |