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

Unified Diff: chrome/browser/ui/auto_login_info_bar_delegate.cc

Issue 10701080: Prevent crash when trying to dismiss an already dismissed infobar. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Follow review. Created 8 years, 5 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/auto_login_info_bar_delegate.cc
diff --git a/chrome/browser/ui/auto_login_info_bar_delegate.cc b/chrome/browser/ui/auto_login_info_bar_delegate.cc
index db5c071a1b632e5e2f1c025115969950a52931fe..b064dc3db61d68478ac5aa8031b01089ecbda088 100644
--- a/chrome/browser/ui/auto_login_info_bar_delegate.cc
+++ b/chrome/browser/ui/auto_login_info_bar_delegate.cc
@@ -222,5 +222,8 @@ void AutoLoginInfoBarDelegate::Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) {
DCHECK_EQ(chrome::NOTIFICATION_GOOGLE_SIGNED_OUT, type);
- owner()->RemoveInfoBar(this);
+ // owner() can be NULL when InfoBarTabHelper removes us. See
+ // |InfoBarDelegate::clear_owner|.
+ if (owner())
+ owner()->RemoveInfoBar(this);
}
« 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