session: dont attach download dialog to deleted webContents window
This commit is contained in:
parent
0fa92923da
commit
46208b5b3e
2 changed files with 4 additions and 2 deletions
|
@ -70,7 +70,9 @@ void AtomDownloadManagerDelegate::OnDownloadPathGenerated(
|
|||
return;
|
||||
|
||||
NativeWindow* window = nullptr;
|
||||
auto relay = NativeWindowRelay::FromWebContents(item->GetWebContents());
|
||||
content::WebContents* web_contents = item->GetWebContents();
|
||||
auto relay = web_contents ? NativeWindowRelay::FromWebContents(web_contents)
|
||||
: nullptr;
|
||||
if (relay)
|
||||
window = relay->window.get();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue