summaryrefslogtreecommitdiffstats
path: root/chrome/browser/search_engines
diff options
context:
space:
mode:
authortim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-11 06:14:47 +0000
committertim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-11 06:14:47 +0000
commitcddc90ba508e867a1f90411f7790e9654032c298 (patch)
tree301831597c3900e6370ab9d19bcde1759946821d /chrome/browser/search_engines
parent53d772baaf0341ffbfa776ff2e0b2af3482cf6e4 (diff)
downloadchromium_src-cddc90ba508e867a1f90411f7790e9654032c298.zip
chromium_src-cddc90ba508e867a1f90411f7790e9654032c298.tar.gz
chromium_src-cddc90ba508e867a1f90411f7790e9654032c298.tar.bz2
Add NULL-check around |url| in TemplateURLService::SetDefaultSearchProviderNoNotify
BUG=109808 TEST= Review URL: http://codereview.chromium.org/9147050 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117173 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/search_engines')
-rw-r--r--chrome/browser/search_engines/template_url_service.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/chrome/browser/search_engines/template_url_service.cc b/chrome/browser/search_engines/template_url_service.cc
index 103f438..b9e1e29 100644
--- a/chrome/browser/search_engines/template_url_service.cc
+++ b/chrome/browser/search_engines/template_url_service.cc
@@ -1605,7 +1605,7 @@ void TemplateURLService::SetDefaultSearchProviderNoNotify(
// If we are syncing, we want to set the synced pref that will notify other
// instances to change their default to this new search provider.
- if (sync_processor_ && !url->sync_guid().empty() && GetPrefs()) {
+ if (sync_processor_ && url && !url->sync_guid().empty() && GetPrefs()) {
GetPrefs()->SetString(prefs::kSyncedDefaultSearchProviderGUID,
url->sync_guid());
}