Index: Source/core/editing/ApplyStyleCommand.cpp |
diff --git a/Source/core/editing/ApplyStyleCommand.cpp b/Source/core/editing/ApplyStyleCommand.cpp |
index f141674f0dccd60e523740a9a121876654c30416..2da7751ff24cbc956d28ed4abef81f559e37868d 100644 |
--- a/Source/core/editing/ApplyStyleCommand.cpp |
+++ b/Source/core/editing/ApplyStyleCommand.cpp |
@@ -372,8 +372,12 @@ void ApplyStyleCommand::applyRelativeFontStyleChange(EditingStyle* style) |
if (startNode == beyondEnd) |
return; |
- if (startNode->isTextNode() && start.deprecatedEditingOffset() >= caretMaxOffset(startNode)) // Move out of text node if range does not include its characters. |
+ if (startNode->isTextNode() && start.deprecatedEditingOffset() >= caretMaxOffset(startNode)) { |
+ // Move out of text node if range does not include its characters. |
startNode = NodeTraversal::next(*startNode); |
+ if (!startNode) |
+ return; |
+ } |
// Store away font size before making any changes to the document. |
// This ensures that changes to one node won't effect another. |