From d7ead6fae918551098658cd63c48d65eb3ec7950 Mon Sep 17 00:00:00 2001 From: "mad@chromium.org" Date: Tue, 26 Feb 2013 23:00:11 +0000 Subject: [PATCH] Prevent a crash when NewTabUI isn't available. BUG=178452 Review URL: https://chromiumcodereview.appspot.com/12310144 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@184755 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/ui/webui/ntp/ntp_login_handler.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/chrome/browser/ui/webui/ntp/ntp_login_handler.cc b/chrome/browser/ui/webui/ntp/ntp_login_handler.cc index 7062aad3fb1b..b2b2544220f9 100644 --- a/chrome/browser/ui/webui/ntp/ntp_login_handler.cc +++ b/chrome/browser/ui/webui/ntp/ntp_login_handler.cc @@ -180,7 +180,9 @@ void NTPLoginHandler::HandleLoginMessageSeen(const ListValue* args) { Profile::FromWebUI(web_ui())->GetPrefs()->SetBoolean( prefs::kSyncPromoShowNTPBubble, false); NewTabUI* ntp_ui = NewTabUI::FromWebUIController(web_ui()->GetController()); - ntp_ui->set_showing_sync_bubble(true); + // When instant extended is enabled, there may not be a NewTabUI object. + if (ntp_ui) + ntp_ui->set_showing_sync_bubble(true); } void NTPLoginHandler::HandleShowAdvancedLoginUI(const ListValue* args) { -- 2.11.4.GIT