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

Unified Diff: chrome/browser/policy/configuration_policy_handler.cc

Issue 9860044: Coverity: check null returns. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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
Index: chrome/browser/policy/configuration_policy_handler.cc
diff --git a/chrome/browser/policy/configuration_policy_handler.cc b/chrome/browser/policy/configuration_policy_handler.cc
index 86611db1cbd0fe2d8a2367e0ed3961df3358539c..36ab22040bc5efcc44571688fb72deaa77c46511 100644
--- a/chrome/browser/policy/configuration_policy_handler.cc
+++ b/chrome/browser/policy/configuration_policy_handler.cc
@@ -741,7 +741,7 @@ void ProxyPolicyHandler::ApplyPolicySettings(const PolicyMap& policies,
break;
case ProxyPrefs::MODE_PAC_SCRIPT: {
std::string pac_url_string;
- if (pac_url->GetAsString(&pac_url_string)) {
+ if (pac_url && pac_url->GetAsString(&pac_url_string)) {
prefs->SetValue(prefs::kProxy,
ProxyConfigDictionary::CreatePacScript(pac_url_string, false));
} else {

Powered by Google App Engine
This is Rietveld 408576698