Chromium Code Reviews| Index: chrome/browser/ui/cocoa/browser_window_controller.mm |
| diff --git a/chrome/browser/ui/cocoa/browser_window_controller.mm b/chrome/browser/ui/cocoa/browser_window_controller.mm |
| index c22f121ed44bb8f752ca8d52052e11ee0fcbf843..5fde5b9a7d258c6e36bcefcf89a1672ab5098f54 100644 |
| --- a/chrome/browser/ui/cocoa/browser_window_controller.mm |
| +++ b/chrome/browser/ui/cocoa/browser_window_controller.mm |
| @@ -627,8 +627,12 @@ using content::WebContents; |
| if ([self isInAnyFullscreenMode]) |
| [floatingBarBackingView_ setNeedsDisplay:YES]; // Okay even if nil. |
| - extensions::ExtensionCommandsGlobalRegistry::Get(browser_->profile())-> |
| - set_registry_for_active_window(extension_keybinding_registry_.get()); |
| + auto registry = |
| + extensions::ExtensionCommandsGlobalRegistry::Get(browser_->profile()); |
| + if (registry) { |
| + registry->set_registry_for_active_window( |
| + extension_keybinding_registry_.get()); |
| + } |
|
Finnur
2015/01/23 10:49:38
Hmm... I'm not sure this is the right fix...
We s
Andre
2015/01/23 18:24:01
Thanks Finnur.
When recording a shortcut for an ex
|
| } |
| - (void)windowDidResignMain:(NSNotification*)notification { |
| @@ -640,8 +644,10 @@ using content::WebContents; |
| if ([self isInAnyFullscreenMode]) |
| [floatingBarBackingView_ setNeedsDisplay:YES]; // Okay even if nil. |
| - extensions::ExtensionCommandsGlobalRegistry::Get(browser_->profile())-> |
| - set_registry_for_active_window(nullptr); |
| + auto registry = |
| + extensions::ExtensionCommandsGlobalRegistry::Get(browser_->profile()); |
| + if (registry) |
| + registry->set_registry_for_active_window(nullptr); |
| } |
| // Called when we are activated (when we gain focus). |