| Index: chrome/browser/sync/glue/sync_start_util.cc
|
| diff --git a/chrome/browser/sync/glue/sync_start_util.cc b/chrome/browser/sync/glue/sync_start_util.cc
|
| index e3fd31fc80debb5aa82a046153a21f29c3f7598a..86c336bb780b102d8c3fbde4b7f7a0faea6def5e 100644
|
| --- a/chrome/browser/sync/glue/sync_start_util.cc
|
| +++ b/chrome/browser/sync/glue/sync_start_util.cc
|
| @@ -18,6 +18,12 @@ namespace {
|
| void StartSyncOnUIThread(const base::FilePath& profile,
|
| syncer::ModelType type) {
|
| ProfileManager* profile_manager = g_browser_process->profile_manager();
|
| + if (!profile_manager) {
|
| + // Can happen in tests.
|
| + DVLOG(2) << "No ProfileManager, can't start sync.";
|
| + return;
|
| + }
|
| +
|
| Profile* p = profile_manager->GetProfileByPath(profile);
|
| if (!p) {
|
| DVLOG(2) << "Profile not found, can't start sync.";
|
|
|