| Index: chrome/browser/ui/webui/net_export_ui.cc
|
| diff --git a/chrome/browser/ui/webui/net_export_ui.cc b/chrome/browser/ui/webui/net_export_ui.cc
|
| index abc8b81a58464600c3ef950f34f9a5bc97f82e51..c886b6d825e2fd0ad888a33d19db790d7fb987a8 100644
|
| --- a/chrome/browser/ui/webui/net_export_ui.cc
|
| +++ b/chrome/browser/ui/webui/net_export_ui.cc
|
| @@ -300,10 +300,13 @@ void NetExportMessageHandler::FileSelected(const base::FilePath& path,
|
| void* params) {
|
| DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
| DCHECK(select_file_dialog_);
|
| - select_file_dialog_ = nullptr;
|
| *last_save_dir.Pointer() = path.DirName();
|
|
|
| file_writer_->StartNetLog(path, capture_mode_, GetURLRequestContexts());
|
| +
|
| + // IMPORTANT: resetting the dialog may lead to the deletion of |path|, so keep
|
| + // this line last.
|
| + select_file_dialog_ = nullptr;
|
| }
|
|
|
| void NetExportMessageHandler::FileSelectionCanceled(void* params) {
|
|
|