Index: chrome/browser/extensions/extension_keybinding_registry.cc |
diff --git a/chrome/browser/extensions/extension_keybinding_registry.cc b/chrome/browser/extensions/extension_keybinding_registry.cc |
index 43ad281e21cc895bb49564a39179c0040a214a04..3ea9c2c8f0454892d9bce480e6df6a6471d35eef 100644 |
--- a/chrome/browser/extensions/extension_keybinding_registry.cc |
+++ b/chrome/browser/extensions/extension_keybinding_registry.cc |
@@ -64,9 +64,11 @@ void ExtensionKeybindingRegistry::CommandExecuted( |
return; |
// Grant before sending the event so that the permission is granted before |
- // the extension acts on the command. |
+ // the extension acts on the command. NOTE: The Global Commands handler does |
+ // not set the delegate as it deals only with named commands (not page/browser |
+ // actions that are associated with the current page directly). |
ActiveTabPermissionGranter* granter = |
- delegate_->GetActiveTabPermissionGranter(); |
+ delegate_ ? delegate_->GetActiveTabPermissionGranter() : NULL; |
if (granter) |
granter->GrantIfRequested(extension); |