diff options
author | viettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-04 21:02:24 +0000 |
---|---|---|
committer | viettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-04 21:02:24 +0000 |
commit | 3438340d3451efa5d5be74006a53f8cde4d13b24 (patch) | |
tree | fcccfd38f7efb1d28198b8db8908cbefba339570 | |
parent | f7f72659b51abad657a600e9198a388c17128517 (diff) | |
download | chromium_src-3438340d3451efa5d5be74006a53f8cde4d13b24.zip chromium_src-3438340d3451efa5d5be74006a53f8cde4d13b24.tar.gz chromium_src-3438340d3451efa5d5be74006a53f8cde4d13b24.tar.bz2 |
Make HandleCrossAppNavigation() handle the case when there's no source tab.
E.g., Browser::OpenURL() will call OpenURLFromTab() (etc.) with no TabContents.
BUG=43040
TEST=Go to Prefs/Options dialog -> Under the Hood -> Privacy, click on "Learn more"; this should work and not crash.
Review URL: http://codereview.chromium.org/1917003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46392 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/browser.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc index f57dab0..b80083f 100644 --- a/chrome/browser/browser.cc +++ b/chrome/browser/browser.cc @@ -3521,6 +3521,10 @@ bool Browser::HandleCrossAppNavigation(TabContents* source, if (!service) return false; + // Can be null, e.g., when executed in a browser with no tabs. + if (!source) + return false; + // Get the source extension, if any. Extension* source_extension = source->app_extension(); if (!source_extension) |