mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Fix a crash when creating window.
This commit is contained in:
@@ -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_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user