summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/ui/autologin_infobar_delegate.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/chrome/browser/ui/autologin_infobar_delegate.cc b/chrome/browser/ui/autologin_infobar_delegate.cc
index e5152d7..1048f68 100644
--- a/chrome/browser/ui/autologin_infobar_delegate.cc
+++ b/chrome/browser/ui/autologin_infobar_delegate.cc
@@ -188,6 +188,9 @@ void AutoLoginInfoBarDelegate::ShowInfoBarIfNeeded(const std::string& account,
TabContentsWrapper* tab_contents_wrapper =
TabContentsWrapper::GetCurrentWrapperForContents(tab_contents);
+ // tab_contents_wrapper is NULL for TabContents hosted in HTMLDialog.
+ if (!tab_contents_wrapper)
+ return;
// Make sure that the account specified matches the logged in user.
// However, account is usually empty. In an incognito window, there may