Index: chrome/browser/browser_process_impl.cc |
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc |
index 2e4d34511357128c0ee4cbf9855772fe37ea4cc8..db2a310edb911c1bb83b3726b8e33351068daa43 100644 |
--- a/chrome/browser/browser_process_impl.cc |
+++ b/chrome/browser/browser_process_impl.cc |
@@ -268,6 +268,13 @@ bool BrowserProcessImpl::ShouldClearLocalState(FilePath* profile_path) { |
FilePath user_data_dir; |
Profile* profile; |
+ // Check for the existance of a profile manager. When quitting early, |
+ // e.g. because another chrome instance is running, or when invoked with |
+ // options such as --uninstall or --try-chrome-again=0, the profile manager |
+ // does not exist yet. |
+ if (!profile_manager_.get()) |
+ return false; |
+ |
PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); |
profile = profile_manager_->GetDefaultProfile(user_data_dir); |
*profile_path = profile->GetPath(); |