From 386f2bcf06d5fb74c176de864190a1c555ad618f Mon Sep 17 00:00:00 2001 From: calamity Date: Sun, 22 Feb 2015 21:43:15 -0800 Subject: [PATCH] Fix crash on app list start page contents not existing. This CL adds a null check around an access to the app list web contents. BUG=460388 Review URL: https://codereview.chromium.org/949823002 Cr-Commit-Position: refs/heads/master@{#317546} --- chrome/browser/ui/app_list/start_page_service.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/chrome/browser/ui/app_list/start_page_service.cc b/chrome/browser/ui/app_list/start_page_service.cc index 068bdafee57d..4df7bbbd343d 100644 --- a/chrome/browser/ui/app_list/start_page_service.cc +++ b/chrome/browser/ui/app_list/start_page_service.cc @@ -657,10 +657,12 @@ void StartPageService::OnURLFetchComplete(const net::URLFetcher* source) { } } - contents_->GetWebUI()->CallJavascriptFunction( - "appList.startPage.onAppListDoodleUpdated", *doodle_json, - base::StringValue( - UIThreadSearchTermsData(profile_).GoogleBaseURLValue())); + if (contents_ && contents_->GetWebUI()) { + contents_->GetWebUI()->CallJavascriptFunction( + "appList.startPage.onAppListDoodleUpdated", *doodle_json, + base::StringValue( + UIThreadSearchTermsData(profile_).GoogleBaseURLValue())); + } } // Check for a new doodle. -- 2.11.4.GIT