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

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

Issue 297203004: Check nullable value before using it in IndentOutdentCommand::tryIndentingAsListItem (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/indent-inline-box-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/IndentOutdentCommand.cpp
diff --git a/Source/core/editing/IndentOutdentCommand.cpp b/Source/core/editing/IndentOutdentCommand.cpp
index 3df05003cb3b2196cf6ae4c97585231da7ac8a77..65aaaf31c9518a5ac9957d89f814aff1857193e0 100644
--- a/Source/core/editing/IndentOutdentCommand.cpp
+++ b/Source/core/editing/IndentOutdentCommand.cpp
@@ -62,7 +62,7 @@ bool IndentOutdentCommand::tryIndentingAsListItem(const Position& start, const P
RefPtr<Element> selectedListItem = enclosingBlock(lastNodeInSelectedParagraph.get());
// FIXME: we need to deal with the case where there is no li (malformed HTML)
- if (!isHTMLLIElement(*selectedListItem))
+ if (!selectedListItem || !isHTMLLIElement(*selectedListItem))
return false;
// FIXME: previousElementSibling does not ignore non-rendered content like <span></span>. Should we?
« no previous file with comments | « LayoutTests/editing/execCommand/indent-inline-box-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698