Fix a crash when creating window.
This commit is contained in:
parent
43e8ecb118
commit
b4ba149662
1 changed files with 4 additions and 0 deletions
|
@ -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_;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue