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

Unified Diff: chrome/browser/ui/cocoa/autofill/save_card_bubble_view_bridge.mm

Issue 2227743003: Fix crash bug in save card bubble on Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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/autofill/save_card_bubble_view_bridge.mm
diff --git a/chrome/browser/ui/cocoa/autofill/save_card_bubble_view_bridge.mm b/chrome/browser/ui/cocoa/autofill/save_card_bubble_view_bridge.mm
index 051bd0b8f981242e4a29cbe1da54eda89cc0c9bd..ab08a77ccb93a7a30daa3efdfe14c8a51ae50998 100644
--- a/chrome/browser/ui/cocoa/autofill/save_card_bubble_view_bridge.mm
+++ b/chrome/browser/ui/cocoa/autofill/save_card_bubble_view_bridge.mm
@@ -99,11 +99,13 @@ void SaveCardBubbleViewBridge::OnBubbleClosed() {
}
void SaveCardBubbleViewBridge::Hide() {
groby-ooo-7-16 2016/08/10 19:49:35 That means Hide() can be called several times? How
Justin Donnelly 2016/08/11 15:41:15 Well, to be honest, I can't say that I 100% unders
- // SaveCardBubbleViewBridge::OnBubbleClosed won't be able to call
- // OnBubbleClosed on the bubble controller since we null the reference to it
- // below. So we need to call it here.
- controller_->OnBubbleClosed();
- controller_ = nullptr;
+ if (controller_) {
+ // SaveCardBubbleViewBridge::OnBubbleClosed won't be able to call
+ // OnBubbleClosed on the bubble controller since we null the reference to it
+ // below. So we need to call it here.
+ controller_->OnBubbleClosed();
+ controller_ = nullptr;
+ }
[view_controller_ close];
}
« 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