summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chrome_browser_main.cc
diff options
context:
space:
mode:
authornoms <noms@chromium.org>2015-01-29 07:27:44 -0800
committerCommit bot <commit-bot@chromium.org>2015-01-29 15:28:37 +0000
commit82e87d588df3a7334cf542ce68c9614869745f70 (patch)
tree9b7592285a8d99330ae4801895dd6ac65e4cfd32 /chrome/browser/chrome_browser_main.cc
parent58af7960deb5d850cde69b90f119dd00d298a191 (diff)
downloadchromium_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.cc4
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);