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

Unified Diff: chrome/browser/ui/webui/extensions/extension_settings_handler.cc

Issue 190723002: Fixed null pointer crash in ExtensionSettingsHandler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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
« 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/extensions/extension_settings_handler.cc
diff --git a/chrome/browser/ui/webui/extensions/extension_settings_handler.cc b/chrome/browser/ui/webui/extensions/extension_settings_handler.cc
index 5fbee8fbb2dafe5f6a1e9cfd993dd84588663dc7..275927ea8bba8daca51725e3d264d4a2861eae98 100644
--- a/chrome/browser/ui/webui/extensions/extension_settings_handler.cc
+++ b/chrome/browser/ui/webui/extensions/extension_settings_handler.cc
@@ -843,8 +843,10 @@ void ExtensionSettingsHandler::HandleEnableMessage(
const Extension* extension =
extension_service_->GetInstalledExtension(extension_id);
- if (!extension ||
- !management_policy_->UserMayModifySettings(extension, NULL)) {
+ if (!extension)
+ return;
+
+ if (!management_policy_->UserMayModifySettings(extension, NULL)) {
LOG(ERROR) << "Attempt to enable an extension that is non-usermanagable was"
<< "made. Extension id: " << extension->id();
return;
« 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