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

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

Issue 220233013: Don't return null from ReplaceSelectionCommand::insertAsListItems() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 9 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/crash-replacing-list-by-list-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/ReplaceSelectionCommand.cpp
diff --git a/Source/core/editing/ReplaceSelectionCommand.cpp b/Source/core/editing/ReplaceSelectionCommand.cpp
index 8b8f99f1294b1b0e365e04c3fd0b0dbcf2b34957..e2b72706ee512e44ad29c380b01416e4cd2e9ceb 100644
--- a/Source/core/editing/ReplaceSelectionCommand.cpp
+++ b/Source/core/editing/ReplaceSelectionCommand.cpp
@@ -1082,7 +1082,7 @@ void ReplaceSelectionCommand::doApply()
}
// Mutation events (bug 22634) may have already removed the inserted content
- if (!refNode->inDocument())
+ if (!refNode || !refNode->inDocument())
Yuta Kitamura 2014/04/02 09:34:49 nit: Test for |!refNode| should probably be done r
yosin_UTC9 2014/04/03 05:01:50 Done.
return;
bool plainTextFragment = isPlainTextMarkup(refNode.get());
« no previous file with comments | « LayoutTests/editing/execCommand/crash-replacing-list-by-list-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698