Commit b5a93aed authored by dcheng@chromium.org's avatar dcheng@chromium.org

Add null check when accessing WebLocalFrameImpl::mainFrameImpl().

The main frame might be null, so we need to check that before trying to
dereference it to see if it's a local frame.

BUG=385162

Review URL: https://codereview.chromium.org/334323002

git-svn-id: svn://svn.chromium.org/blink/trunk@176245 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 7f4da1df
......@@ -442,7 +442,7 @@ WebViewImpl::~WebViewImpl()
WebLocalFrameImpl* WebViewImpl::mainFrameImpl()
{
return m_page && m_page->mainFrame()->isLocalFrame() ? WebLocalFrameImpl::fromFrame(m_page->deprecatedLocalMainFrame()) : 0;
return m_page && m_page->mainFrame() && m_page->mainFrame()->isLocalFrame() ? WebLocalFrameImpl::fromFrame(m_page->deprecatedLocalMainFrame()) : 0;
}
bool WebViewImpl::tabKeyCyclesThroughElements() const
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment