diff options
author | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-21 18:07:17 +0000 |
---|---|---|
committer | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-21 18:07:17 +0000 |
commit | babaa4e9c446721c92aff4f18e22c9314bc397f9 (patch) | |
tree | a8b0a18953fe8dad635b0607517d0e2c06e859a7 /chrome/browser/browser_init.cc | |
parent | e6afc404a37f4889726ea73dd788bd52c1fd3c38 (diff) | |
download | chromium_src-babaa4e9c446721c92aff4f18e22c9314bc397f9.zip chromium_src-babaa4e9c446721c92aff4f18e22c9314bc397f9.tar.gz chromium_src-babaa4e9c446721c92aff4f18e22c9314bc397f9.tar.bz2 |
coverity: Make sure we have a profile before potentially adding the Crashed infobar.
CID=5723
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/165494
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23981 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_init.cc')
-rw-r--r-- | chrome/browser/browser_init.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/chrome/browser/browser_init.cc b/chrome/browser/browser_init.cc index 9ca8f12..ecb5be2 100644 --- a/chrome/browser/browser_init.cc +++ b/chrome/browser/browser_init.cc @@ -4,6 +4,8 @@ #include "chrome/browser/browser_init.h" +#include <algorithm> + #if defined(OS_WIN) #include "app/win_util.h" #endif @@ -577,7 +579,8 @@ Browser* BrowserInit::LaunchWithProfile::OpenURLsInBrowser( urls[i], GURL(), PageTransition::START_PAGE, (i == 0), -1, false, NULL); if (i < static_cast<size_t>(pin_count)) browser->tabstrip_model()->SetTabPinned(browser->tab_count() - 1, true); - if (i == 0 && process_startup && !browser_defaults::kSuppressCrashInfoBar) + if (profile_ && i == 0 && + process_startup && !browser_defaults::kSuppressCrashInfoBar) AddCrashedInfoBarIfNecessary(tab); } browser->window()->Show(); @@ -790,7 +793,7 @@ bool BrowserInit::ProcessCmdLineImpl(const CommandLine& command_line, L"Extension Packaging Error", MB_OK | MB_SETFOREGROUND); return false; } -#endif // defined(OS_WIN) +#endif // defined(OS_WIN) return false; } } |