diff options
author | noms <noms@chromium.org> | 2015-01-29 07:27:44 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-01-29 15:28:37 +0000 |
commit | 82e87d588df3a7334cf542ce68c9614869745f70 (patch) | |
tree | 9b7592285a8d99330ae4801895dd6ac65e4cfd32 /chrome/browser/chrome_browser_main.cc | |
parent | 58af7960deb5d850cde69b90f119dd00d298a191 (diff) | |
download | chromium_src-82e87d588df3a7334cf542ce68c9614869745f70.zip chromium_src-82e87d588df3a7334cf542ce68c9614869745f70.tar.gz chromium_src-82e87d588df3a7334cf542ce68c9614869745f70.tar.bz2 |
[Win] Fix crash if the profile dir cannot be created
If the profile is NULL, the code will hit the CHECK on line 389 anyway.
BUG=414332
Review URL: https://codereview.chromium.org/878143003
Cr-Commit-Position: refs/heads/master@{#313709}
Diffstat (limited to 'chrome/browser/chrome_browser_main.cc')
-rw-r--r-- | chrome/browser/chrome_browser_main.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc index 998c362..2cfb3e8 100644 --- a/chrome/browser/chrome_browser_main.cc +++ b/chrome/browser/chrome_browser_main.cc @@ -364,7 +364,9 @@ Profile* CreatePrimaryProfile(const content::MainFunctionParams& parameters, // signed out, then we should show the user manager instead. By switching // the active profile to the guest profile we ensure that no // browser windows will be opened for the guest profile. - if (switches::IsNewProfileManagement() && !profile->IsGuestSession()) { + if (switches::IsNewProfileManagement() && + profile && + !profile->IsGuestSession()) { ProfileInfoCache& cache = g_browser_process->profile_manager()->GetProfileInfoCache(); size_t profile_index = cache.GetIndexOfProfileWithPath(profile_path); |