Commit 3ce4302f authored by qsr@chromium.org's avatar qsr@chromium.org

Prevent crash when trying to dismiss an already dismissed infobar.

 The owner of an infobar delegate might be NULL if the infobar is
already in the process of being deleted. Checking for this before asking
it to dismiss in the auto-login infobar.

TEST=None
BUG=None


Review URL: https://chromiumcodereview.appspot.com/10701080

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145896 0039d316-1c4b-4281-b951-d872f2087c98
parent ebb7adc5
......@@ -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);
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment