libchromiumcontent/patches/047-browser_plugin_guest.patch

19 строки
868 B
Diff
Исходник Обычный вид История

diff --git a/content/browser/browser_plugin/browser_plugin_guest.cc b/content/browser/browser_plugin/browser_plugin_guest.cc
index 964c9a093a3b..f3b3d66ff267 100644
--- a/content/browser/browser_plugin/browser_plugin_guest.cc
+++ b/content/browser/browser_plugin/browser_plugin_guest.cc
@@ -214,8 +214,11 @@ void BrowserPluginGuest::Init() {
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() {