| Index: chrome/browser/profiles/profile_manager.cc
|
| diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc
|
| index 1337b660518f900c4762c19bbbc2140b850de314..1bf92a41a1528c9c5b4baaaccd5d13f6f200cc26 100644
|
| --- a/chrome/browser/profiles/profile_manager.cc
|
| +++ b/chrome/browser/profiles/profile_manager.cc
|
| @@ -459,6 +459,9 @@ void ProfileManager::CreateProfileAsync(
|
| }
|
|
|
| bool ProfileManager::IsValidProfile(Profile* profile) {
|
| + // The profile_manager() returns NULL when running unit tests.
|
| + if (!(g_browser_process->profile_manager()))
|
| + return false;
|
| for (ProfilesInfoMap::iterator iter = profiles_info_.begin();
|
| iter != profiles_info_.end(); ++iter) {
|
| if (iter->second->created) {
|
|
|