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

Unified Diff: content/browser/frame_host/render_widget_host_view_guest.cc

Issue 2588233002: Fix a crash related to null BrowserPluginGuest on Mac (Closed)
Patch Set: Created 4 years 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/browser/frame_host/render_widget_host_view_guest.cc
diff --git a/content/browser/frame_host/render_widget_host_view_guest.cc b/content/browser/frame_host/render_widget_host_view_guest.cc
index b14a741cd2243b1cdd955777019c5b69c83d04f8..4c649d349fa14e48e8081d8a8d905c9416fdb86f 100644
--- a/content/browser/frame_host/render_widget_host_view_guest.cc
+++ b/content/browser/frame_host/render_widget_host_view_guest.cc
@@ -544,8 +544,9 @@ void RenderWidgetHostViewGuest::UnlockCompositingSurface() {
RenderWidgetHostViewBase*
RenderWidgetHostViewGuest::GetOwnerRenderWidgetHostView() const {
- return static_cast<RenderWidgetHostViewBase*>(
- guest_->GetOwnerRenderWidgetHostView());
+ return guest_ ? static_cast<RenderWidgetHostViewBase*>(
+ guest_->GetOwnerRenderWidgetHostView())
+ : nullptr;
}
// TODO(wjmaclean): When we remove BrowserPlugin, delete this code.
« 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