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); |
+ } |
} |
} |