Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(404)

Unified Diff: chrome/browser/dom_ui/filebrowse_ui.cc

Issue 2343002: File browser crash fix (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/dom_ui/filebrowse_ui.cc
===================================================================
--- chrome/browser/dom_ui/filebrowse_ui.cc (revision 48484)
+++ chrome/browser/dom_ui/filebrowse_ui.cc (working copy)
@@ -1075,8 +1075,11 @@
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 &&
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698