From: Cheng Zhao Date: Fri, 11 Jul 2014 11:39:35 +0000 (+0800) Subject: Fix a crash when creating window. X-Git-Tag: v0.14.0~1^2~30 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=b4ba14966297aca882e530ff4c5403f9dc888490;p=electron.git Fix a crash when creating window. --- diff --git a/atom/browser/atom_browser_client.cc b/atom/browser/atom_browser_client.cc index cbe5f5b8..b62bc37b 100644 --- a/atom/browser/atom_browser_client.cc +++ b/atom/browser/atom_browser_client.cc @@ -26,6 +26,10 @@ struct FindByProcessId { } bool operator() (NativeWindow* const window) { + content::WebContents* web_contents = window->GetWebContents(); + if (!web_contents) + return false; + int id = window->GetWebContents()->GetRenderProcessHost()->GetID(); return id == child_process_id_; }