Index: third_party/WebKit/Source/web/WebViewImpl.cpp |
diff --git a/third_party/WebKit/Source/web/WebViewImpl.cpp b/third_party/WebKit/Source/web/WebViewImpl.cpp |
index fc4e911fddbe0a260f794548cdb7ed500d6ded23..51c670e32bfda5beeff2d96f934908b025eaf992 100644 |
--- a/third_party/WebKit/Source/web/WebViewImpl.cpp |
+++ b/third_party/WebKit/Source/web/WebViewImpl.cpp |
@@ -3085,8 +3085,8 @@ double WebViewImpl::setZoomLevel(double zoomLevel) |
if (mainFrame()->isWebRemoteFrame()) |
return m_zoomLevel; |
- LocalFrame* frame = mainFrameImpl()->frame(); |
- if (!WebLocalFrameImpl::pluginContainerFromFrame(frame)) { |
+ LocalFrame* frame = mainFrameImpl() ? mainFrameImpl()->frame() : nullptr; |
kenrb
2016/01/15 20:09:12
It isn't clear to me why mainFrameImpl() would ret
oshima
2016/01/15 22:24:10
It was crashing when I made the original version o
|
+ if (frame && !WebLocalFrameImpl::pluginContainerFromFrame(frame)) { |
float zoomFactor = m_zoomFactorOverride ? m_zoomFactorOverride : static_cast<float>(zoomLevelToZoomFactor(m_zoomLevel)); |
zoomFactor *= m_zoomFactorForDeviceScaleFactor; |
frame->setPageZoomFactor(zoomFactor); |