Index: Source/core/rendering/RenderBox.cpp |
diff --git a/Source/core/rendering/RenderBox.cpp b/Source/core/rendering/RenderBox.cpp |
index a7c43665778a45f7fbb1e35fa5dbf0fa0c34c493..38053d64fe357e8aad0fdd371eea783da637e566 100644 |
--- a/Source/core/rendering/RenderBox.cpp |
+++ b/Source/core/rendering/RenderBox.cpp |
@@ -254,7 +254,7 @@ void RenderBox::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle |
// If our zoom factor changes and we have a defined scrollLeft/Top, we need to adjust that value into the |
// new zoomed coordinate space. |
- if (hasOverflowClip() && oldStyle && newStyle && oldStyle->effectiveZoom() != newStyle->effectiveZoom()) { |
+ if (hasOverflowClip() && oldStyle && newStyle && oldStyle->effectiveZoom() != newStyle->effectiveZoom() && layer()) { |
if (int left = layer()->scrollXOffset()) { |
left = (left / oldStyle->effectiveZoom()) * newStyle->effectiveZoom(); |
layer()->scrollToXOffset(left); |