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

Unified Diff: chrome/browser/ui/webui/voicesearch_ui.cc

Issue 554603002: Fix a browser crash on opening 'chrome://voicesearch' in guest mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed review comment. Created 6 years, 3 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/webui/voicesearch_ui.cc
diff --git a/chrome/browser/ui/webui/voicesearch_ui.cc b/chrome/browser/ui/webui/voicesearch_ui.cc
index b33ad743ba997df362ffe35bec2f359955a431e3..48b9b59dbda59a5112b7bb6d43b408924a23bd61 100644
--- a/chrome/browser/ui/webui/voicesearch_ui.cc
+++ b/chrome/browser/ui/webui/voicesearch_ui.cc
@@ -245,7 +245,7 @@ class VoiceSearchDomHandler : public WebUIMessageHandler {
std::string audio_logging_enabled = "No";
HotwordService* hotword_service =
HotwordServiceFactory::GetForProfile(profile_);
- if (hotword_service->IsOptedIntoAudioLogging())
+ if (hotword_service && hotword_service->IsOptedIntoAudioLogging())
audio_logging_enabled = "Yes";
AddPair(list, ASCIIToUTF16("Hotword Audio Logging Enabled"),
ASCIIToUTF16(audio_logging_enabled));
« 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