diff options
Diffstat (limited to 'WebCore/editing/BreakBlockquoteCommand.cpp')
-rw-r--r-- | WebCore/editing/BreakBlockquoteCommand.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/WebCore/editing/BreakBlockquoteCommand.cpp b/WebCore/editing/BreakBlockquoteCommand.cpp index 1ca2d87..2da6047 100644 --- a/WebCore/editing/BreakBlockquoteCommand.cpp +++ b/WebCore/editing/BreakBlockquoteCommand.cpp @@ -51,7 +51,16 @@ void BreakBlockquoteCommand::doApply() if (endingSelection().isRange()) deleteSelection(false, false); + // This is a scenario that should never happen, but we want to + // make sure we don't dereference a null pointer below. + + ASSERT(!endingSelection().isNone()); + + if (endingSelection().isNone()) + return; + VisiblePosition visiblePos = endingSelection().visibleStart(); + // pos is a position equivalent to the caret. We use downstream() so that pos will // be in the first node that we need to move (there are a few exceptions to this, see below). Position pos = endingSelection().start().downstream(); |