Index: chrome/browser/chromeos/login/login_utils.cc |
diff --git a/chrome/browser/chromeos/login/login_utils.cc b/chrome/browser/chromeos/login/login_utils.cc |
index 7b3d88ba48e5984d484a89c0179ee9d7f91c9f0c..192136c337dc1e1b9795066348522b75aabd54c4 100644 |
--- a/chrome/browser/chromeos/login/login_utils.cc |
+++ b/chrome/browser/chromeos/login/login_utils.cc |
@@ -562,7 +562,14 @@ void LoginUtilsImpl::OnProfileCreated(Profile* user_profile, Status status) { |
user_profile->OnLogin(); |
- delegate_->OnProfilePrepared(user_profile); |
+ // TODO(altimofeev): This pointer should probably never be NULL, but it looks |
+ // like LoginUtilsImpl::OnProfileCreated() may be getting called before |
+ // LoginUtilsImpl::PrepareProfile() has set |delegate_| when Chrome is killed |
altimofeev
2011/08/10 20:12:42
Actually, only LoginUtilsImpl:: PrepareProflie doe
|
+ // during shutdown in tests -- see http://crosbug.com/18269. Replace this |
+ // 'if' statement with a CHECK(delegate_) once the underlying issue is |
+ // resolved. |
+ if (delegate_) |
+ delegate_->OnProfilePrepared(user_profile); |
// TODO(altimofeev): Need to sanitize memory used to store password. |
credentials_ = GaiaAuthConsumer::ClientLoginResult(); |