diff options
author | brettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-08 02:26:32 +0000 |
---|---|---|
committer | brettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-08 02:26:32 +0000 |
commit | 90e8d0661e7ad64e2d708ed9b20de5e4a093783d (patch) | |
tree | 687a61a60953236272a02fe65f09997a082fc7cc /chrome/browser/browser.cc | |
parent | 71c7885ed81d49cb044498cd0f07db700b390655 (diff) | |
download | chromium_src-90e8d0661e7ad64e2d708ed9b20de5e4a093783d.zip chromium_src-90e8d0661e7ad64e2d708ed9b20de5e4a093783d.tar.gz chromium_src-90e8d0661e7ad64e2d708ed9b20de5e4a093783d.tar.bz2 |
Fix a crash (visible sometimes in the single process UI tests in
RestoreToDifferentWindow).
Review URL: http://codereview.chromium.org/1809
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1833 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser.cc')
-rw-r--r-- | chrome/browser/browser.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc index b2ed3fa..186588d 100644 --- a/chrome/browser/browser.cc +++ b/chrome/browser/browser.cc @@ -864,8 +864,13 @@ void Browser::Observe(NotificationType type, case NOTIFY_SSL_STATE_CHANGED: // When the current tab's SSL state changes, we need to update the URL - // bar to reflect the new state. - if (GetSelectedTabContents()->controller() == + // bar to reflect the new state. Note that it's possible for the selected + // tab contents to be NULL. This is because we listen for all sources + // (NavigationControllers) for convenience, so the notification could + // actually be for a different window while we're doing asynchronous + // closing of this one. + if (GetSelectedTabContents() && + GetSelectedTabContents()->controller() == Source<NavigationController>(source).ptr()) UpdateToolBar(false); break; |