Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1070)

Unified Diff: chrome/browser/ui/app_list/start_page_service.cc

Issue 949823002: Fix crash on app list start page contents not existing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/app_list/start_page_service.cc
diff --git a/chrome/browser/ui/app_list/start_page_service.cc b/chrome/browser/ui/app_list/start_page_service.cc
index d389dc2be042439244ea943d757500720c3deb4e..fa697573a7b6e0432712db261efcb472b4ff3dec 100644
--- a/chrome/browser/ui/app_list/start_page_service.cc
+++ b/chrome/browser/ui/app_list/start_page_service.cc
@@ -655,10 +655,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.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698