| Index: chrome/browser/ui/browser.cc
|
| diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
|
| index 4dbfd458fc9c63ef00b1834aed7850bdf27100c5..b18e90f80885dc14d09781150c361f57c8df3e3e 100644
|
| --- a/chrome/browser/ui/browser.cc
|
| +++ b/chrome/browser/ui/browser.cc
|
| @@ -1306,7 +1306,10 @@ void Browser::ShowDownload(content::DownloadItem* download) {
|
| // download (started before initial navigation completed) close it.
|
| WebContents* source = download->GetWebContents();
|
| if (source && source->GetController().IsInitialNavigation() &&
|
| - tab_strip_model_->count() > 1 && !download->IsSavePackageDownload()) {
|
| + tab_strip_model_->count() > 1 &&
|
| + tab_strip_model_->GetIndexOfWebContents(source) !=
|
| + TabStripModel::kNoTab &&
|
| + !download->IsSavePackageDownload()) {
|
| CloseContents(source);
|
| }
|
|
|
|
|