diff options
-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(); } |