summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorzelidrag@chromium.org <zelidrag@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-28 18:42:03 +0000
committerzelidrag@chromium.org <zelidrag@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-28 18:42:03 +0000
commitd519bed65cbdb8ba820af89ec3fb3ec7f77cbad0 (patch)
treeb1369f79dc29c973f3cddc0d3a0e9a085127047c /chrome
parent40777b1cf1258913e853255a7d1b1c6218339201 (diff)
downloadchromium_src-d519bed65cbdb8ba820af89ec3fb3ec7f77cbad0.zip
chromium_src-d519bed65cbdb8ba820af89ec3fb3ec7f77cbad0.tar.gz
chromium_src-d519bed65cbdb8ba820af89ec3fb3ec7f77cbad0.tar.bz2
File browser crash fix.
BUG=3650 TEST=none Review URL: http://codereview.chromium.org/2343002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48505 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/dom_ui/filebrowse_ui.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/chrome/browser/dom_ui/filebrowse_ui.cc b/chrome/browser/dom_ui/filebrowse_ui.cc
index dd05315..1be3402 100644
--- a/chrome/browser/dom_ui/filebrowse_ui.cc
+++ b/chrome/browser/dom_ui/filebrowse_ui.cc
@@ -1075,8 +1075,11 @@ Browser* FileBrowseUI::GetPopupForPath(const std::string& path) {
for (BrowserList::const_iterator it = BrowserList::begin();
it != BrowserList::end(); ++it) {
if ((*it)->type() == Browser::TYPE_POPUP) {
- const GURL& url =
- (*it)->GetTabContentsAt((*it)->selected_index())->GetURL();
+ TabContents* tab_contents = (*it)->GetSelectedTabContents();
+ DCHECK(tab_contents);
+ if (!tab_contents)
+ continue;
+ const GURL& url = tab_contents->GetURL();
if (url.SchemeIs(chrome::kChromeUIScheme) &&
url.host() == chrome::kChromeUIFileBrowseHost &&