diff options
author | beng@google.com <beng@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-12 21:20:40 +0000 |
---|---|---|
committer | beng@google.com <beng@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-12 21:20:40 +0000 |
commit | ba8c48211556deeb2279043f81c9a3898d4d0b36 (patch) | |
tree | e68e8192e5b9110537ecd0d4c306c434683dbf29 /chrome/browser/browser.cc | |
parent | 0b756175fed67aeefccb9bfd36b1c2fc69b8d35d (diff) | |
download | chromium_src-ba8c48211556deeb2279043f81c9a3898d4d0b36.zip chromium_src-ba8c48211556deeb2279043f81c9a3898d4d0b36.tar.gz chromium_src-ba8c48211556deeb2279043f81c9a3898d4d0b36.tar.bz2 |
Now I have correct information on 11790 - NULL check TabContents in case this code is called during async window shutdown.
http://crbug.com/11790
Review URL: http://codereview.chromium.org/113292
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15899 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser.cc')
-rw-r--r-- | chrome/browser/browser.cc | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc index 7de7a50..9f0d027 100644 --- a/chrome/browser/browser.cc +++ b/chrome/browser/browser.cc @@ -2341,19 +2341,18 @@ void Browser::ProcessPendingUIUpdates() { window()->GetLocationBar()->UpdatePageActions(); // Updating the URL happens synchronously in ScheduleUIUpdate. - - if (flags & TabContents::INVALIDATE_LOAD && GetStatusBubble()) - GetStatusBubble()->SetStatus(GetSelectedTabContents()->GetStatusText()); + TabContents* selected_tab = GetSelectedTabContents(); + if (selected_tab && flags & TabContents::INVALIDATE_LOAD && GetStatusBubble()) + GetStatusBubble()->SetStatus(selected_tab->GetStatusText()); if (flags & TabContents::INVALIDATE_TAB) { tabstrip_model_.UpdateTabContentsStateAt( tabstrip_model_.GetIndexOfController(&contents->controller()), false); window_->UpdateTitleBar(); - if (contents == GetSelectedTabContents()) { - TabContents* current_tab = GetSelectedTabContents(); + if (selected_tab && contents == selected_tab) { command_updater_.UpdateCommandEnabled(IDC_CREATE_SHORTCUTS, - !current_tab->GetFavIcon().isNull()); + !selected_tab->GetFavIcon().isNull()); } } |