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

Unified Diff: Source/core/html/forms/TextFieldInputType.cpp

Issue 288143002: Added missing null check to avoid crash. (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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/forms/TextFieldInputType.cpp
diff --git a/Source/core/html/forms/TextFieldInputType.cpp b/Source/core/html/forms/TextFieldInputType.cpp
index 5bbc66fa83073a96345c481aebfbae2559450e4e..1bc9e7bab0445c155d7c11c733a9bb0caf643f76 100644
--- a/Source/core/html/forms/TextFieldInputType.cpp
+++ b/Source/core/html/forms/TextFieldInputType.cpp
@@ -232,9 +232,10 @@ void TextFieldInputType::forwardEvent(Event* event)
if (RenderBox* innerTextRenderer = element().innerTextElement()->renderBox()) {
// FIXME: This class has no need to know about RenderLayer!
if (RenderLayer* innerLayer = innerTextRenderer->layer()) {
- RenderLayerScrollableArea* innerScrollableArea = innerLayer->scrollableArea();
- IntSize scrollOffset(!renderTextControl->style()->isLeftToRightDirection() ? innerScrollableArea->scrollWidth() : 0, 0);
- innerScrollableArea->scrollToOffset(scrollOffset, ScrollOffsetClamped);
+ if (RenderLayerScrollableArea* innerScrollableArea = innerLayer->scrollableArea()) {
+ IntSize scrollOffset(!renderTextControl->style()->isLeftToRightDirection() ? innerScrollableArea->scrollWidth() : 0, 0);
+ innerScrollableArea->scrollToOffset(scrollOffset, ScrollOffsetClamped);
+ }
}
}
« 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