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

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

Issue 610323003: Editing: Null-check in FrameSelection::updteAppearancea (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add a layout test Created 6 years, 2 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/selection/deleteFromDocument-crash-expected.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/FrameSelection.cpp
diff --git a/Source/core/editing/FrameSelection.cpp b/Source/core/editing/FrameSelection.cpp
index e926915f5b7dda89c0a78697375a17edb1f7c485..a782a75ab973ac89131efb089a23d87a3b59d559 100644
--- a/Source/core/editing/FrameSelection.cpp
+++ b/Source/core/editing/FrameSelection.cpp
@@ -1602,7 +1602,7 @@ void FrameSelection::updateAppearance(ResetCaretBlinkOption option)
if (startPos.isNotNull() && endPos.isNotNull() && selection.visibleStart() != selection.visibleEnd()) {
RenderObject* startRenderer = startPos.deprecatedNode()->renderer();
RenderObject* endRenderer = endPos.deprecatedNode()->renderer();
- if (startRenderer->view() == view && endRenderer->view() == view)
+ if (startRenderer && endRenderer && startRenderer->view() == view && endRenderer->view() == view)
view->setSelection(startRenderer, startPos.deprecatedEditingOffset(), endRenderer, endPos.deprecatedEditingOffset());
}
}
« no previous file with comments | « LayoutTests/editing/selection/deleteFromDocument-crash-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698