From bb42c2c7b65b3f4fd5b0e796e48fde2a96eb6638 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Fri, 5 Jun 2015 18:13:30 +0800 Subject: [PATCH] Avoid destorying api::WebContents for twice --- atom/browser/api/atom_api_web_contents.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/atom/browser/api/atom_api_web_contents.cc b/atom/browser/api/atom_api_web_contents.cc index 3678be78..3d925b83 100644 --- a/atom/browser/api/atom_api_web_contents.cc +++ b/atom/browser/api/atom_api_web_contents.cc @@ -409,7 +409,7 @@ void WebContents::WillAttach(content::WebContents* embedder_web_contents, } void WebContents::Destroy() { - if (is_guest()) { + if (is_guest() && managed_web_contents()) { // When force destroying the "destroyed" event is not emitted. WebContentsDestroyed(); -- 2.43.0