| Index: chrome/browser/chrome_browser_main.cc
|
| diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc
|
| index 998c36218d2d464397af86505576ba5a441f542a..2cfb3e81161cb21bf9ce49d402ef32798323210c 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);
|
|
|