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

Unified Diff: third_party/WebKit/Source/core/editing/LayoutSelection.cpp

Issue 2968363002: Return null SelectionPaintRange if no LayoutObject. (Closed)
Patch Set: Created 3 years, 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/editing/LayoutSelection.cpp
diff --git a/third_party/WebKit/Source/core/editing/LayoutSelection.cpp b/third_party/WebKit/Source/core/editing/LayoutSelection.cpp
index bde8150398df160f23b3ab508de9e8e66f74e268..7585134d5941b192a27488d56d6015ef6bb8a0e0 100644
--- a/third_party/WebKit/Source/core/editing/LayoutSelection.cpp
+++ b/third_party/WebKit/Source/core/editing/LayoutSelection.cpp
@@ -322,6 +322,8 @@ static SelectionPaintRange CalcSelectionPaintRange(
DCHECK(start_layout_object);
DCHECK(end_layout_object);
DCHECK(start_layout_object->View() == end_layout_object->View());
+ if (!start_layout_object || !end_layout_object)
+ return SelectionPaintRange();
return SelectionPaintRange(start_layout_object,
start_pos.ComputeEditingOffset(),
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698