Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

Commit

Permalink
[Win] Fix crash if the profile dir cannot be created
Browse files Browse the repository at this point in the history
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}
  • Loading branch information
notwaldorf authored and Commit bot committed Jan 29, 2015
1 parent 58af796 commit 82e87d5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion chrome/browser/chrome_browser_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 82e87d5

Please sign in to comment.