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

Unified Diff: content/renderer/render_view_impl.cc

Issue 1006073002: Null check webview() before using it in RenderViewImpl::OnOrientationChange (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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: content/renderer/render_view_impl.cc
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index 0a8ce9b6810f12a908f87072da12acc1746e1f7c..ee6add31166b77222d3e8ff562afd6aeff42f28b 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -3024,7 +3024,8 @@ void RenderViewImpl::OnMediaPlayerActionAt(const gfx::Point& location,
}
void RenderViewImpl::OnOrientationChange() {
- webview()->mainFrame()->toWebLocalFrame()->sendOrientationChangeEvent();
+ if (webview() && webview()->mainFrame()->isWebLocalFrame())
+ webview()->mainFrame()->toWebLocalFrame()->sendOrientationChangeEvent();
}
void RenderViewImpl::OnPluginActionAt(const gfx::Point& location,
« 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