Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(834)

Unified Diff: Source/core/editing/CompositeEditCommand.cpp

Issue 303743003: Check null position start of paragraph to move parameter in CompositeEditCommand::moveParagraph (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/editing/execCommand/unlistify-body-crash-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/CompositeEditCommand.cpp
diff --git a/Source/core/editing/CompositeEditCommand.cpp b/Source/core/editing/CompositeEditCommand.cpp
index b7cdd68aa64943606b7a6a8274afb27129d2c66f..52d32ae6e8530172f1ca1c0c67f210b6e57c13fb 100644
--- a/Source/core/editing/CompositeEditCommand.cpp
+++ b/Source/core/editing/CompositeEditCommand.cpp
@@ -1147,7 +1147,7 @@ void CompositeEditCommand::moveParagraph(const VisiblePosition& startOfParagraph
void CompositeEditCommand::moveParagraphs(const VisiblePosition& startOfParagraphToMove, const VisiblePosition& endOfParagraphToMove, const VisiblePosition& destination, bool preserveSelection, bool preserveStyle, Node* constrainingAncestor)
{
- if (startOfParagraphToMove == destination)
+ if (startOfParagraphToMove == destination || startOfParagraphToMove.isNull())
return;
int startIndex = -1;
« no previous file with comments | « LayoutTests/editing/execCommand/unlistify-body-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698