2018-09-14 05:02:16 +00:00
|
|
|
diff --git a/content/browser/browser_plugin/browser_plugin_guest.cc b/content/browser/browser_plugin/browser_plugin_guest.cc
|
2018-09-14 18:03:43 +00:00
|
|
|
index a0bc9305e62d..7f022f6cfda7 100644
|
2018-09-14 05:02:16 +00:00
|
|
|
--- a/content/browser/browser_plugin/browser_plugin_guest.cc
|
|
|
|
+++ b/content/browser/browser_plugin/browser_plugin_guest.cc
|
2018-09-14 18:03:43 +00:00
|
|
|
@@ -207,8 +207,11 @@ void BrowserPluginGuest::Init() {
|
2018-09-14 05:02:16 +00:00
|
|
|
|
|
|
|
WebContentsImpl* owner_web_contents = static_cast<WebContentsImpl*>(
|
|
|
|
delegate_->GetOwnerWebContents());
|
|
|
|
- owner_web_contents->CreateBrowserPluginEmbedderIfNecessary();
|
|
|
|
- InitInternal(BrowserPluginHostMsg_Attach_Params(), owner_web_contents);
|
|
|
|
+ if (nullptr != owner_web_contents)
|
|
|
|
+ {
|
|
|
|
+ owner_web_contents->CreateBrowserPluginEmbedderIfNecessary();
|
|
|
|
+ InitInternal(BrowserPluginHostMsg_Attach_Params(), owner_web_contents);
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
|
|
|
|
base::WeakPtr<BrowserPluginGuest> BrowserPluginGuest::AsWeakPtr() {
|