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

Unified Diff: chrome/browser/ui/cocoa/permission_bubble/permission_bubble_controller.mm

Issue 2786943003: [Mac] Fix a potential crash in the permission bubble controller (Closed)
Patch Set: Created 3 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/cocoa/permission_bubble/permission_bubble_controller.mm
diff --git a/chrome/browser/ui/cocoa/permission_bubble/permission_bubble_controller.mm b/chrome/browser/ui/cocoa/permission_bubble/permission_bubble_controller.mm
index 9ad5c68e43fe5a396db84b65252d1411a1d36f77..11932109087d82ef940be27019c5b1c12cd82fbf 100644
--- a/chrome/browser/ui/cocoa/permission_bubble/permission_bubble_controller.mm
+++ b/chrome/browser/ui/cocoa/permission_bubble/permission_bubble_controller.mm
@@ -282,9 +282,10 @@ const NSInteger kFullscreenLeftOffset = 40;
}
- (void)showWindow:(id)sender {
- if ([self hasVisibleLocationBar]) {
- decoration_ = [[self.parentWindow windowController] locationBarBridge]
- ->GetPageInfoDecoration();
+ LocationBarViewMac* bridge =
+ [[self.parentWindow windowController] locationBarBridge];
+ if ([self hasVisibleLocationBar] && bridge) {
+ decoration_ = bridge->GetPageInfoDecoration();
decoration_->SetActive(true);
}
« 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