| Index: Source/core/editing/ReplaceSelectionCommand.cpp
|
| diff --git a/Source/core/editing/ReplaceSelectionCommand.cpp b/Source/core/editing/ReplaceSelectionCommand.cpp
|
| index c58cc8f05c8c01952bbe8510a21345158e42f966..6c02731b24770433e5ee03b1560ccc68dd0b32cf 100644
|
| --- a/Source/core/editing/ReplaceSelectionCommand.cpp
|
| +++ b/Source/core/editing/ReplaceSelectionCommand.cpp
|
| @@ -1121,7 +1121,7 @@ void ReplaceSelectionCommand::doApply()
|
|
|
| // We inserted before the insertionBlock to prevent nesting, and the content before the insertionBlock wasn't in its own block and
|
| // didn't have a br after it, so the inserted content ended up in the same paragraph.
|
| - if (insertionBlock && insertionPos.deprecatedNode() == insertionBlock->parentNode() && (unsigned)insertionPos.deprecatedEditingOffset() < insertionBlock->nodeIndex() && !isStartOfParagraph(startOfInsertedContent))
|
| + if (!startOfInsertedContent.isNull() && insertionBlock && insertionPos.deprecatedNode() == insertionBlock->parentNode() && (unsigned)insertionPos.deprecatedEditingOffset() < insertionBlock->nodeIndex() && !isStartOfParagraph(startOfInsertedContent))
|
| insertNodeAt(createBreakElement(document()).get(), startOfInsertedContent.deepEquivalent());
|
|
|
| if (endBR && (plainTextFragment || (shouldRemoveEndBR(endBR, originalVisPosBeforeEndBR) && !(fragment.hasInterchangeNewlineAtEnd() && selectionIsPlainText)))) {
|
|
|