| Index: chrome/browser/ui/webui/ntp/ntp_login_handler.cc
|
| diff --git a/chrome/browser/ui/webui/ntp/ntp_login_handler.cc b/chrome/browser/ui/webui/ntp/ntp_login_handler.cc
|
| index c53b1ba7873a880000f211d1f8102d4f53c46b1e..001e7e995caecce4994ab1e37686314a69627f0d 100644
|
| --- a/chrome/browser/ui/webui/ntp/ntp_login_handler.cc
|
| +++ b/chrome/browser/ui/webui/ntp/ntp_login_handler.cc
|
| @@ -173,8 +173,14 @@ void NTPLoginHandler::HandleShowAdvancedLoginUI(const base::ListValue* args) {
|
|
|
| void NTPLoginHandler::UpdateLogin() {
|
| Profile* profile = Profile::FromWebUI(web_ui());
|
| - std::string username =
|
| - SigninManagerFactory::GetForProfile(profile)->GetAuthenticatedUsername();
|
| + SigninManagerBase* signin_manager =
|
| + SigninManagerFactory::GetForProfile(profile);
|
| + if (!signin_manager) {
|
| + // Guests on desktop do not have a signin manager.
|
| + return;
|
| + }
|
| +
|
| + std::string username = signin_manager->GetAuthenticatedUsername();
|
|
|
| base::string16 header, sub_header;
|
| std::string icon_url;
|
|
|