diff options
author | cpu@google.com <cpu@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-26 19:45:48 +0000 |
---|---|---|
committer | cpu@google.com <cpu@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-26 19:45:48 +0000 |
commit | b61dc904432a44b49a50adeafc7722aefa5a937a (patch) | |
tree | cd0d7cdf5bd958c4831398e0213114b8e14750ce /chrome/browser | |
parent | 3d2a59b8aa0bfdc78a55bd291bacc099fc486763 (diff) | |
download | chromium_src-b61dc904432a44b49a50adeafc7722aefa5a937a.zip chromium_src-b61dc904432a44b49a50adeafc7722aefa5a937a.tar.gz chromium_src-b61dc904432a44b49a50adeafc7722aefa5a937a.tar.bz2 |
Fix for a crash in the info bubble at first run
- Null deref in GetDefaultSearchEngineName
- This is a stopgap fix
Issue = 2573
Review URL: http://codereview.chromium.org/4304
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2636 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/views/first_run_bubble.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/chrome/browser/views/first_run_bubble.cc b/chrome/browser/views/first_run_bubble.cc index 2dfc8ef..5b6fac0 100644 --- a/chrome/browser/views/first_run_bubble.cc +++ b/chrome/browser/views/first_run_bubble.cc @@ -27,14 +27,17 @@ namespace { // infobubble provides. static const int kBubblePadding = 4; -// TODO(cpu): bug 1187517. It is possible that there is no default provider. -// we should make sure there is none at first run. std::wstring GetDefaultSearchEngineName() { Browser* browser = BrowserList::GetLastActive(); DCHECK(browser); const TemplateURL* const default_provider = browser->profile()->GetTemplateURLModel()->GetDefaultSearchProvider(); - DCHECK(default_provider); + if (!default_provider) { + // TODO(cpu): bug 1187517. It is possible to have no default provider. + // returning an empty string is a stopgap measure for the crash + // http://code.google.com/p/chromium/issues/detail?id=2573 + return std::wstring(); + } return default_provider->short_name(); } |