Check render frame host before getting context
This commit is contained in:
parent
a62c2f9e2e
commit
6837ec8576
1 changed files with 1 additions and 1 deletions
|
@ -65,7 +65,7 @@ class FileSelectHelper : public base::RefCounted<FileSelectHelper>,
|
|||
file_info.push_back(info);
|
||||
}
|
||||
|
||||
if (!paths.empty()) {
|
||||
if (render_frame_host_ && !paths.empty()) {
|
||||
auto browser_context = static_cast<atom::AtomBrowserContext*>(
|
||||
render_frame_host_->GetProcess()->GetBrowserContext());
|
||||
browser_context->prefs()->SetFilePath(prefs::kSelectFileLastDirectory,
|
||||
|
|
Loading…
Reference in a new issue